diff --git a/.editorconfig b/.editorconfig index 8f96039..7590a3e 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,3 +8,6 @@ end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true + +[*.{yml,yaml}] +indent_size = 2 diff --git a/.travis.yml b/.travis.yml index 80fbbc9..3891988 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,41 @@ sudo: false -language: node_js +git: + depth: 1 + +branches: + only: + - master + - /^greenkeeper/.*$/ -node_js: - - '7' - - '6' - - '5' - - '4' +language: node_js +# cache node modules cache: - directories: - - node_modules + directories: + - $HOME/.npm + - node_modules + +matrix: + include: + - node_js: '8' + script: npm run pretest + env: CI=pretest + - node_js: '8' + script: npm run test-only + env: CI=tests + - node_js: '6' + script: npm run test-only + env: CI=tests 6 + - node_js: '4' + script: npm run test-only + env: CI=tests 4 + sudo: required before_install: - - npm prune - - npm update + - npm install -g npm@latest + - npm i -g greenkeeper-lockfile@1 + +before_script: greenkeeper-lockfile-update + +after_script: greenkeeper-lockfile-upload diff --git a/CHANGELOG.md b/CHANGELOG.md index 16c3370..3fe8da9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,84 +4,90 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org). -# Head +## 8.0.0 -- Added **(Major update)**: `remark-lint-no-url-trailing-slash` rule. -- Changed: value for `remark-lint-maximum-line-length` rule is now `80`. +- Added: `remark-comment-config` plugin. +- Added: `remark-message-control` plugin. +- Added **(Major update)**: `remark-lint-no-url-trailing-slash` rule. +- Added **(Major update)**: `remark-validate-links` rule. +- Added **(Major update)**: `remark-lint-no-multiple-toplevel-headings` rule. +- Added **(Major update)**: `remark-lint-no-heading-like-paragraph` rule. +- Changed: value for `remark-lint-maximum-line-length` rule is now `80`. +- Changed: value for `remark-lint-list-item-indent` rule is now `space`. -# 7.0.2 - 2017-07-31 +## 7.0.2 - 2017-07-31 -- Chore: minimum required `remark-lint-no-paragraph-content-indent` - version is now `^1.0.2`. +- Chore: minimum required `remark-lint-no-paragraph-content-indent` version + is now `^1.0.2`. -# 7.0.1 - 2017-07-27 +## 7.0.1 - 2017-07-27 -- Chore: minimum required `remark-lint-no-paragraph-content-indent` - version is now `^1.0.1`. +- Chore: minimum required `remark-lint-no-paragraph-content-indent` + version is now `^1.0.1`. -# 7.0.0 - 2017-07-26 +## 7.0.0 - 2017-07-26 -- Added **(Major update)**: `remark-lint-no-paragraph-content-indent` rule. +- Added **(Major update)**: `remark-lint-no-paragraph-content-indent` rule. -- Added **(Major update)**: `remark-lint-linebreak-style` rule. +- Added **(Major update)**: `remark-lint-linebreak-style` rule. -- Added **(Major update)**: `remark-lint-code-block-style` rule. +- Added **(Major update)**: `remark-lint-code-block-style` rule. -- Changed: use `allowEmpty: false` for `remark-lint-fenced-code-flag` rule. +- Changed: use `allowEmpty: false` for `remark-lint-fenced-code-flag` rule. -- Changed: use `---` horizontal rule for `remark-lint-rule-style` rule. +- Changed: use `---` horizontal rule for `remark-lint-rule-style` rule. -- Changed: use `"` quotes for `remark-lint-link-title-style` rule. +- Changed: use `"` quotes for `remark-lint-link-title-style` rule. -- Fixed: rename `remark-lint-no-blockquote-without-caret` - rule to `remark-lint-no-blockquote-without-marker` rule. +- Fixed: rename `remark-lint-no-blockquote-without-caret` + rule to `remark-lint-no-blockquote-without-marker` rule. -# 6.0.0 - 2017-03-11 +## 6.0.0 - 2017-03-11 -- Changed: set option to `tab-size` for `list-item-indent` rule. +- Changed: set option to `tab-size` for `list-item-indent` rule. -# 5.0.2 - 2017-02-27 +## 5.0.2 - 2017-02-27 -- Fixed: removed `remark-comment-config` from `dependencies`. +- Fixed: removed `remark-comment-config` from `dependencies`. -# 5.0.1 - 2017-02-24 +## 5.0.1 - 2017-02-24 -- Fixed: removed `remark-lint` from `peerDependencies`. +- Fixed: removed `remark-lint` from `peerDependencies`. -# 5.0.0 - 2017-02-24 +## 5.0.0 - 2017-02-24 -- Chore **(Major update)**: minimum required `remark-lint` - version is now `^6.0.0`. +- Chore **(Major update)**: minimum required `remark-lint` + version is now `^6.0.0`. -# 4.0.0 - 2016-12-20 +## 4.0.0 - 2016-12-20 -- Added **(Major update)**: `no-empty-url` rule. -- Chore: added `no-heading-like-paragraph` rule for tracking. +- Added **(Major update)**: `no-empty-url` rule. +- Chore: added `no-heading-like-paragraph` rule for tracking. -# 3.0.0 - 2016-11-02 +## 3.0.0 - 2016-11-02 -- Added **(Major update)**: `no-duplicate-headings-in-section` rule. +- Added **(Major update)**: `no-duplicate-headings-in-section` rule. -- Added **(Major update)**: `no-reference-like-url` rule. +- Added **(Major update)**: `no-reference-like-url` rule. -- Changed: disable `no-duplicate-headings` rule. +- Changed: disable `no-duplicate-headings` rule. -- Changed: `first-heading-level` option to `1`. +- Changed: `first-heading-level` option to `1`. -- Chore **(Major update)**: minimum required `remark-lint` - version is now `^5.2.0`. +- Chore **(Major update)**: minimum required `remark-lint` + version is now `^5.2.0`. -# 2.0.0 - 2016-10-03 +## 2.0.0 - 2016-10-03 -- Changed: set option to `true` for `list-item-spacing` rule. +- Changed: set option to `true` for `list-item-spacing` rule. -- Changed: set options to `120` for `maximum-line-length` rule. +- Changed: set options to `120` for `maximum-line-length` rule. -- Changed: set option to `_______` for `rule-style` rule. +- Changed: set option to `_______` for `rule-style` rule. -- Chore **(Major update)**: minimum required `remark-lint` - version is now `^5.1.0`. +- Chore **(Major update)**: minimum required `remark-lint` + version is now `^5.1.0`. -# 1.0.0 - 2016-08-22 +## 1.0.0 - 2016-08-22 -- Initial release. +- Initial release. diff --git a/__tests__/fixtures/BOOTSTRAP-README.md b/__tests__/fixtures/BOOTSTRAP-README.md index 5523250..d848ad1 100644 --- a/__tests__/fixtures/BOOTSTRAP-README.md +++ b/__tests__/fixtures/BOOTSTRAP-README.md @@ -21,39 +21,39 @@ To get started, check out ! ## Table of contents -- [Quick start](#quick-start) -- [Bugs and feature requests](#bugs-and-feature-requests) -- [Documentation](#documentation) -- [Contributing](#contributing) -- [Community](#community) -- [Versioning](#versioning) -- [Creators](#creators) -- [Copyright and license](#copyright-and-license) +- [Quick start](#quick-start) +- [Bugs and feature requests](#bugs-and-feature-requests) +- [Documentation](#documentation) +- [Contributing](#contributing) +- [Community](#community) +- [Versioning](#versioning) +- [Creators](#creators) +- [Copyright and license](#copyright-and-license) ## Quick start Several quick start options are available: -- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.0.0-alpha.5.zip) +- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.0.0-alpha.5.zip) -- Clone the repo: `git clone https://github.com/twbs/bootstrap.git` +- Clone the repo: `git clone https://github.com/twbs/bootstrap.git` -- Install with [npm](https://www.npmjs.com): - `npm install bootstrap@4.0.0-alpha.5` +- Install with [npm](https://www.npmjs.com): + `npm install bootstrap@4.0.0-alpha.5` -- Install with [Meteor](https://www.meteor.com): - `meteor add twbs:bootstrap@=4.0.0-alpha.5` +- Install with [Meteor](https://www.meteor.com): + `meteor add twbs:bootstrap@=4.0.0-alpha.5` -- Install with [Composer](https://getcomposer.org): - `composer require twbs/bootstrap` +- Install with [Composer](https://getcomposer.org): + `composer require twbs/bootstrap` -- Install with [Bower](https://bower.io): - `bower install bootstrap#v4.0.0-alpha.5` +- Install with [Bower](https://bower.io): + `bower install bootstrap#v4.0.0-alpha.5` -- Install with [NuGet](https://www.nuget.org): - CSS: `Install-Package bootstrap -Pre` - Sass: `Install-Package bootstrap.sass -Pre` (`-Pre` is only - required until Bootstrap v4 has a stable release). +- Install with [NuGet](https://www.nuget.org): + CSS: `Install-Package bootstrap -Pre` + Sass: `Install-Package bootstrap.sass -Pre` (`-Pre` is only + required until Bootstrap v4 has a stable release). Read the [Getting started page](https://getbootstrap.com/getting-started/) for information on the framework contents, templates and examples, and more. @@ -95,18 +95,18 @@ GitHub Pages at . The docs may also be run locally. ### Running documentation locally -1. Run through the - [tooling setup](https://github.com/twbs/bootstrap/blob/v4-dev/docs/getting-started/build-tools.md#tooling-setup) - to install Jekyll (the site builder) and other Ruby dependencies - with `bundle install`. +1. Run through the + [tooling setup](https://github.com/twbs/bootstrap/blob/v4-dev/docs/getting-started/build-tools.md#tooling-setup) + to install Jekyll (the site builder) and other Ruby dependencies + with `bundle install`. -2. Run `grunt` (or a specific set of Grunt tasks) to rebuild distributed CSS - and JavaScript files, as well as our docs assets. +2. Run `grunt` (or a specific set of Grunt tasks) to rebuild distributed CSS + and JavaScript files, as well as our docs assets. -3. From the root `/bootstrap` directory, run `bundle exec jekyll serve` in - the command line. +3. From the root `/bootstrap` directory, run `bundle exec jekyll serve` in + the command line. -4. Open in your browser, and voilà. +4. Open in your browser, and voilà. Learn more about using Jekyll by reading its [documentation](https://jekyllrb.com/docs/home/). @@ -137,21 +137,21 @@ for easy use in common text editors. Read more and download plugins at -- +- +- **Jacob Thornton** -- -- +- +- ## Copyright and license diff --git a/__tests__/fixtures/CHANGELOG.md b/__tests__/fixtures/CHANGELOG.md index 64366aa..010721d 100644 --- a/__tests__/fixtures/CHANGELOG.md +++ b/__tests__/fixtures/CHANGELOG.md @@ -9,129 +9,129 @@ and this project adheres to [Semantic Versioning](http://semver.org). ### Added -- zh-CN and zh-TW translations from @tianshuo. -- de translation from @mpbzh. -- it-IT translation from @roalz. -- sv translation from @magol. -- tr-TR translation from @karalamalar. +- zh-CN and zh-TW translations from @tianshuo. +- de translation from @mpbzh. +- it-IT translation from @roalz. +- sv translation from @magol. +- tr-TR translation from @karalamalar. ### Changed -- Start versioning based on the current English version at 0.3.0 to help - translation authors keep things up-to-date. +- Start versioning based on the current English version at 0.3.0 to help + translation authors keep things up-to-date. ## [0.3.0](https://github.com/olivierlacan/keep-a-changelog/compare/v0.2.0...v0.3.0) - 2015-12-03 ### Added -- RU translation from @aishek. -- pt-BR translation from @tallesl. -- es-ES translation from @ZeliosAriex. +- RU translation from @aishek. +- pt-BR translation from @tallesl. +- es-ES translation from @ZeliosAriex. ## [0.2.0](https://github.com/olivierlacan/keep-a-changelog/compare/v0.1.0...v0.2.0) - 2015-10-06 ### Changed -- Remove exclusionary mentions of "open source" since this project can benefit - both "open" and "closed" source projects equally. +- Remove exclusionary mentions of "open source" since this project can benefit + both "open" and "closed" source projects equally. ## [0.1.0](https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.8...v0.1.0) - 2015-10-06 ### Added -- Answer "Should you ever rewrite a change log?". +- Answer "Should you ever rewrite a change log?". ### Changed -- Improve argument against commit logs. -- Start following [SemVer](http://semver.org) properly. +- Improve argument against commit logs. +- Start following [SemVer](http://semver.org) properly. ## [0.0.8](https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.7...v0.0.8) - 2015-02-17 ### Changed -- Update year to match in every README example. +- Update year to match in every README example. -- Reluctantly stop making fun of Brits only, since most of the world - writes dates in a strange way. +- Reluctantly stop making fun of Brits only, since most of the world + writes dates in a strange way. ### Fixed -- Fix typos in recent README changes. -- Update outdated unreleased diff link. +- Fix typos in recent README changes. +- Update outdated unreleased diff link. ## [0.0.7](https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.6...v0.0.7) - 2015-02-16 ### Added -- Link, and make it obvious that date format is ISO 8601. +- Link, and make it obvious that date format is ISO 8601. ### Changed -- Clarified the section on "Is there a standard change log format?". +- Clarified the section on "Is there a standard change log format?". ### Fixed -- Fix Markdown links to tag comparison URL with footnote-style links. +- Fix Markdown links to tag comparison URL with footnote-style links. ## [0.0.6](https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.5...v0.0.6) - 2014-12-12 ### Added -- README section on "yanked" releases. +- README section on "yanked" releases. ## [0.0.5](https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.4...v0.0.5) - 2014-08-09 ### Added -- Markdown links to version tags on release headings. +- Markdown links to version tags on release headings. -- Unreleased section to gather unreleased changes and encourage note - keeping prior to releases. +- Unreleased section to gather unreleased changes and encourage note + keeping prior to releases. ## [0.0.4](https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.3...v0.0.4) - 2014-08-09 ### Added -- Better explanation of the difference between the file ("CHANGELOG") - and its function "the change log". +- Better explanation of the difference between the file ("CHANGELOG") + and its function "the change log". ### Changed -- Refer to a "change log" instead of a "CHANGELOG" throughout the site - to differentiate between the file and the purpose of the file — the - logging of changes. +- Refer to a "change log" instead of a "CHANGELOG" throughout the site + to differentiate between the file and the purpose of the file — the + logging of changes. ### Removed -- Remove empty sections from CHANGELOG, they occupy too much space and - create too much noise in the file. People will have to assume that the - missing sections were intentionally left out because they contained no - notable changes. +- Remove empty sections from CHANGELOG, they occupy too much space and + create too much noise in the file. People will have to assume that the + missing sections were intentionally left out because they contained no + notable changes. ## [0.0.3](https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.2...v0.0.3) - 2014-08-09 ### Added -- "Why should I care?" section mentioning The Changelog podcast. +- "Why should I care?" section mentioning The Changelog podcast. ## [0.0.2](https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.1...v0.0.2) - 2014-07-10 ### Added -- Explanation of the recommended reverse chronological release ordering. +- Explanation of the recommended reverse chronological release ordering. ## 0.0.1 - 2014-05-31 ### Added -- This CHANGELOG file to hopefully serve as an evolving example of a - standardized open source project CHANGELOG. +- This CHANGELOG file to hopefully serve as an evolving example of a + standardized open source project CHANGELOG. -- CNAME file to enable GitHub Pages custom domain +- CNAME file to enable GitHub Pages custom domain -- README now contains answers to common questions about CHANGELOGs +- README now contains answers to common questions about CHANGELOGs -- Good examples and basic guidelines, including proper date formatting. +- Good examples and basic guidelines, including proper date formatting. -- Counter-examples: "What makes unicorns cry?" +- Counter-examples: "What makes unicorns cry?" diff --git a/__tests__/fixtures/LICENSE.md b/__tests__/fixtures/LICENSE.md new file mode 100644 index 0000000..5b0b3bb --- /dev/null +++ b/__tests__/fixtures/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 itgalaxy inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/__tests__/fixtures/README.md b/__tests__/fixtures/README.md index d8535ad..c7d6dce 100644 --- a/__tests__/fixtures/README.md +++ b/__tests__/fixtures/README.md @@ -8,54 +8,54 @@ Insteria is a WordPress starter theme with a modern development workflow. ## Table of contents -- [Features](#features) -- [Requirements](#requirements) -- [Browser requirements](#browser-requirements) -- [Theme installation](#theme-installation) -- [Theme setup](#theme-setup) -- [Testing](#testing) -- [FAQ](#faq) -- [Contribution](#contribution) -- [Changelog](#changelog) -- [Copyright and license](#copyright-and-license) +- [Features](#features) +- [Requirements](#requirements) +- [Browser Support](#browser-support) +- [Theme installation](#theme-installation) +- [Theme setup](#theme-setup) +- [Testing](#testing) +- [FAQ](#faq) +- [Contribution](#contribution) +- [Changelog](#changelog) +- [Copyright and license](#copyright-and-license) ## Features -- [Sass](http://sass-lang.com/documentation/file.SASS_REFERENCE.html) - for stylesheets. - [Postcss-cssnext](https://github.com/MoOx/postcss-cssnext) - and [css-modules](https://github.com/css-modules/css-modules) - are also supported for pure css in stylesheets. +- [Sass](http://sass-lang.com/documentation/file.SASS_REFERENCE.html) + for stylesheets. + [Postcss-cssnext](https://github.com/MoOx/postcss-cssnext) + and [css-modules](https://github.com/css-modules/css-modules) + are also supported for pure css in stylesheets. -- Latest ES syntax for JavaScript. Automatically determine the Babel plugins - and polyfills you need based on your supported environments - [babel-preset-env](https://github.com/babel/babel-preset-env). +- Latest ES syntax for JavaScript. Automatically determine the Babel plugins + and polyfills you need based on your supported environments + [babel-preset-env](https://github.com/babel/babel-preset-env). -- [Webpack](https://webpack.github.io) for compiling assets, - optimizing images, and concatenating and minifying files. +- [Webpack](https://webpack.github.io) for compiling assets, + optimizing images, and concatenating and minifying files. -- [Browsersync](http://www.browsersync.io) for synchronized browser testing. +- [Browsersync](http://www.browsersync.io) for synchronized browser testing. -- CSS [Bootstrap 3](http://getbootstrap.com) framework. +- CSS [Bootstrap 3](http://getbootstrap.com) framework. -- [Font Awesome](http://fontawesome.io). +- [Font Awesome](http://fontawesome.io). ## Requirements -- [WordPress](https://wordpress.org) >= 4.8.0 **(don't use older versions ` - WordPress`, it's not stable and unsecurity)** +- [WordPress](https://wordpress.org) >= 4.8.0 **(don't use older versions + `WordPress`, it's not stable and unsecurity)** -- [PHP](http://php.net/manual/en/install.php) >= 7.x.x +- [PHP](http://php.net/manual/en/install.php) >= 7.x.x -- [Composer](https://getcomposer.org/download) >= 1.x.x +- [Composer](https://getcomposer.org/download) >= 1.x.x -- [Node.js](http://nodejs.org) >= 6.11.x +- [Node.js](http://nodejs.org) >= 6.11.x -- [npm](https://www.npmjs.com) >= 3.x.x +- [npm](https://www.npmjs.com) >= 3.x.x ## Browser Support -[See browserlist](browserslist). +[See browserlist](LICENSE.md). Also you can run command to get list of latest versions supported browsers: @@ -67,8 +67,8 @@ npm run analysis:browserslist Several quick start options are available: -- [Download the latest release](https://gitlab.itgalaxy.company/itgalaxy/insteria/repository/archive.zip?ref=master). -- Clone the repo `git clone` +- [Download the latest release](https://gitlab.itgalaxy.company/itgalaxy/insteria/repository/archive.zip?ref=master). +- Clone the repo `git clone` ### Install dependencies @@ -101,59 +101,59 @@ That's all. ## Theme setup -Edit [src/lib/setup.php](src/lib/setup.php) to enable or disable theme features, +Edit [src/lib/setup.php](LICENSE.md) to enable or disable theme features, setup navigation menus and sidebars. -Edit [src/lib/image-sizes.php](src/lib/image-sizes.php) to setup post +Edit [src/lib/image-sizes.php](LICENSE.md) to setup post thumbnail sizes. -Edit [src/lib/scripts.php](src/lib/scripts.php) to setup scripts and styles. +Edit [src/lib/scripts.php](LICENSE.md) to setup scripts and styles. -Actions and filters contains in classes into [src/lib/Hooked](src/lib/Hooked) +Actions and filters contains in classes into [src/lib/Hooked](LICENSE.md) directory. For new action and filter need to create new class. ## Commands ### Build and Watch -- `npm run build:dev` - compile the files for development. +- `npm run build:dev` - compile the files for development. -- `npm run build` (alias `npm run build:prod`) - compile and optimize - the files for production. +- `npm run build` (alias `npm run build:prod`) - compile and optimize + the files for production. -- `npm run watch` - don’t want to manually recompile the files after - every change. +- `npm run watch` - don’t want to manually recompile the files after every + change. ### Linting -- `npm run lint` - run linters against your files. +- `npm run lint` - run linters against your files. Also your can run specific linters: -- `npm run lint:eslint` - run linters against your files. -- `npm run lint:stylelint` - run linters against your files. -- `npm run lint:remark` - run linters against your files. +- `npm run lint:eslint` - run linters against your files. +- `npm run lint:stylelint` - run linters against your files. +- `npm run lint:remark` - run linters against your files. -See the [package.json](package.json) to determine all possible commands. +See the [package.json](LICENSE.md) to determine all possible commands. ### Analysis -- `npm run analysis:browserslist` - see that browsers supported. -- `npm run analysis:cloc` - copy/paste detector for programming source code.. +- `npm run analysis:browserslist` - see that browsers supported. +- `npm run analysis:cloc` - copy/paste detector for programming source code.. -See the [package.json](package.json) to determine all possible commands. +See the [package.json](LICENSE.md) to determine all possible commands. ### Testing -- `npm run test` - run tests, before tests starts linting. -- `npm run test-only` - run only tests. +- `npm run test` - run tests, before tests starts linting. +- `npm run test-only` - run only tests. ## About tests We have two difference directories for tests: -- `tests` (in root project directory) - stored `phpunit` tests. -- `**/__tests__` (in each directory contain javascript) - stored `ava` tests. +- `tests` (in root project directory) - stored `phpunit` tests. +- `**/__tests__` (in each directory contain javascript) - stored `ava` tests. ### Ava @@ -169,37 +169,37 @@ It takes a little preparation to run the tests. Optional. -- Code Coverage Analysis. +- Code Coverage Analysis. - Before you can use the code coverage analysis features in PHPUnit, - you should read the [Xdebug](https://xdebug.org) installation guide. + Before you can use the code coverage analysis features in PHPUnit, + you should read the [Xdebug](https://xdebug.org) installation guide. -1. Run `mysql` as `root`. +1. Run `mysql` as `root`. - ```shell - mysql -uroot # also your can run `sudo mysql` - ``` + ```shell + mysql -uroot # also your can run `sudo mysql` + ``` -2. Create temporary testing user. +2. Create temporary testing user. - ```shell - CREATE USER 'user'@'localhost' IDENTIFIED BY 'password'; - GRANT ALL ON db.* TO 'user'@'localhost'; - ``` + ```shell + CREATE USER 'user'@'localhost' IDENTIFIED BY 'password'; + GRANT ALL ON db.* TO 'user'@'localhost'; + ``` -3. Run `phpunit`. +3. Run `phpunit`. - ```shell - composer test - ``` + ```shell + composer test + ``` -4. After running the tests, you can delete temporary testing user. +4. After running the tests, you can delete temporary testing user. - Run `mysql` as `root` (see above). And run: + Run `mysql` as `root` (see above). And run: - ```shell - DROP USER 'user'@'localhost'; - ``` + ```shell + DROP USER 'user'@'localhost'; + ``` ## FAQ @@ -218,12 +218,27 @@ and simplifies maintenance the code. This not only guarantees that the written code works as expected, it allows to see different possibilities of its use. -## [Contribution](CONTRIBUTING.md) +> Line that was wrapped. -## [Changelog](CHANGELOG.md) +```js +var foo = 1; +``` + +999. bar +1000. foo + +Combined emphasis with **two asterisks and *one asterisks***. + + + +*** + +## [Contribution](LICENSE.md) + +## [Changelog](LICENSE.md) ## Copyright and license Code and documentation copyright 2014-2017 Itgalaxy, Inc. -Code released under [the MIT license](LICENSE). -Docs released under [Creative Commons](docs/LICENSE). +Code released under [the MIT license](LICENSE.md). +Docs released under [Creative Commons](LICENSE.md). diff --git a/__tests__/index.js b/__tests__/index.js index c72de11..69c992f 100644 --- a/__tests__/index.js +++ b/__tests__/index.js @@ -37,8 +37,11 @@ test("should have no error on valid syntax", t => return resolve(contents); }) ).then(contents => - new Promise((resolve, reject) => - remark() + new Promise((resolve, reject) => { + // Remove `remark-validate-links`, because it doesn't work not on CLI + config.plugins.splice(3, 1); + + return remark() .use(config.plugins) .process(contents.toString(), (error, file) => { if (error) { @@ -46,8 +49,8 @@ test("should have no error on valid syntax", t => } return resolve(file); - }) - ).then(file => { + }); + }).then(file => { t.true( file.messages.length === 0, `no lint error in ${filePath}` diff --git a/index.js b/index.js index af2139f..9ebf38b 100644 --- a/index.js +++ b/index.js @@ -3,6 +3,14 @@ module.exports = { plugins: [ require("remark-lint"), + require("remark-comment-config"), + [ + require("remark-message-control"), + { + name: "lint" + } + ], + require("remark-validate-links"), [require("remark-lint-blockquote-indentation"), 2], [ require("remark-lint-checkbox-character-style"), @@ -16,7 +24,7 @@ module.exports = { require("remark-lint-definition-case"), require("remark-lint-definition-spacing"), [require("remark-lint-emphasis-marker"), "*"], - [require("remark-lint-fenced-code-flag"), { allowEmpty: false }], + require("remark-lint-fenced-code-flag"), [require("remark-lint-fenced-code-marker"), "`"], [require("remark-lint-file-extension"), "md"], require("remark-lint-final-definition"), @@ -29,10 +37,10 @@ module.exports = { [require("remark-lint-link-title-style"), '"'], require("remark-lint-list-item-bullet-indent"), require("remark-lint-list-item-content-indent"), - [require("remark-lint-list-item-indent"), "tab-size"], + [require("remark-lint-list-item-indent"), "space"], require("remark-lint-list-item-spacing"), - [require("remark-lint-maximum-heading-length")], - [require("remark-lint-maximum-line-length"), 80], + require("remark-lint-maximum-heading-length"), + require("remark-lint-maximum-line-length"), require("remark-lint-no-auto-link-without-protocol"), require("remark-lint-no-blockquote-without-marker"), require("remark-lint-no-consecutive-blank-lines"), @@ -47,11 +55,13 @@ module.exports = { require("remark-lint-no-file-name-outer-dashes"), require("remark-lint-no-heading-content-indent"), require("remark-lint-no-heading-indent"), + require("remark-lint-no-heading-like-paragraph"), require("remark-lint-no-heading-punctuation"), require("remark-lint-no-html"), require("remark-lint-no-inline-padding"), require("remark-lint-no-literal-urls"), require("remark-lint-no-missing-blank-lines"), + require("remark-lint-no-multiple-toplevel-headings"), require("remark-lint-no-paragraph-content-indent"), require("remark-lint-no-reference-like-url"), require("remark-lint-no-shell-dollars"), @@ -69,7 +79,7 @@ module.exports = { require("remark-lint-table-pipe-alignment"), require("remark-lint-table-pipes"), [require("remark-lint-unordered-list-marker-style"), "-"], - [require("remark-lint-no-url-trailing-slash")] + require("remark-lint-no-url-trailing-slash") ], settings: { breaks: false, @@ -81,9 +91,11 @@ module.exports = { fence: "`", fences: false, footnotes: false, + gfm: true, incrementListMarker: true, listItemIndent: "tab", looseTable: false, + paddedTable: true, pedantic: false, rule: "-", ruleRepetition: 3, diff --git a/package-lock.json b/package-lock.json index f7dcf0d..b84025e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "remark-preset-lint-itgalaxy", - "version": "7.0.2", + "version": "8.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -119,6 +119,12 @@ "semver": "5.0.3" }, "dependencies": { + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "dev": true + }, "semver": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz", @@ -209,10 +215,9 @@ } }, "aria-query": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-0.7.0.tgz", - "integrity": "sha512-/r2lHl09V3o74+2MLKEdewoj37YZqiQZnfen1O4iNlrOjUgeKuu1U2yF3iKh6HJxqF+OXkLMfQv65Z/cvxD6vA==", - "dev": true, + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-0.3.0.tgz", + "integrity": "sha1-y4qZhOKGJxHIPICt5bj1yg3itGc=", "requires": { "ast-types-flow": "0.0.7" } @@ -1171,6 +1176,23 @@ "dev": true, "requires": { "pinkie-promise": "1.0.0" + }, + "dependencies": { + "pinkie": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-1.0.0.tgz", + "integrity": "sha1-Wkfyi6EBXQIBvae/DzWOR77Ix+Q=", + "dev": true + }, + "pinkie-promise": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-1.0.0.tgz", + "integrity": "sha1-0dpn9UglY7t89X8oauKCLs+/NnA=", + "dev": true, + "requires": { + "pinkie": "1.0.0" + } + } } }, "code-excerpt": { @@ -1336,21 +1358,6 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "2.0.4" - } } } }, @@ -1488,21 +1495,6 @@ "pify": "2.3.0", "pinkie-promise": "2.0.1" } - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "2.0.4" - } } } }, @@ -1516,10 +1508,9 @@ } }, "doctrine": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.0.0.tgz", - "integrity": "sha1-xz2NKQnSIpHhoAejlYBNqLZl/mM=", - "dev": true, + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "requires": { "esutils": "2.0.2", "isarray": "1.0.0" @@ -1695,6 +1686,16 @@ "supports-color": "2.0.0" } }, + "doctrine": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.0.0.tgz", + "integrity": "sha1-xz2NKQnSIpHhoAejlYBNqLZl/mM=", + "dev": true, + "requires": { + "esutils": "2.0.2", + "isarray": "1.0.0" + } + }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -1728,46 +1729,6 @@ "requires": { "debug": "2.6.8", "pkg-dir": "1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "requires": { - "pinkie-promise": "2.0.1" - } - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "requires": { - "pinkie": "2.0.4" - } - }, - "pkg-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", - "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", - "requires": { - "find-up": "1.1.2" - } - } } }, "eslint-plugin-ava": { @@ -1801,17 +1762,6 @@ "lodash.cond": "4.5.2", "minimatch": "3.0.4", "read-pkg-up": "2.0.0" - }, - "dependencies": { - "doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", - "requires": { - "esutils": "2.0.2", - "isarray": "1.0.0" - } - } } }, "eslint-plugin-itgalaxy": { @@ -1839,6 +1789,17 @@ "damerau-levenshtein": "1.0.4", "emoji-regex": "6.5.1", "jsx-ast-utils": "1.4.1" + }, + "dependencies": { + "aria-query": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-0.7.0.tgz", + "integrity": "sha512-/r2lHl09V3o74+2MLKEdewoj37YZqiQZnfen1O4iNlrOjUgeKuu1U2yF3iKh6HJxqF+OXkLMfQv65Z/cvxD6vA==", + "dev": true, + "requires": { + "ast-types-flow": "0.0.7" + } + } } }, "eslint-plugin-lodash": { @@ -1897,6 +1858,16 @@ "jsx-ast-utils": "2.0.0" }, "dependencies": { + "doctrine": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.0.0.tgz", + "integrity": "sha1-xz2NKQnSIpHhoAejlYBNqLZl/mM=", + "dev": true, + "requires": { + "esutils": "2.0.2", + "isarray": "1.0.0" + } + }, "jsx-ast-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.0.0.tgz", @@ -2059,10 +2030,9 @@ } }, "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", - "dev": true + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-2.0.1.tgz", + "integrity": "sha1-HugBBonnOV/5RIJByYZSvHWagmA=" }, "external-editor": { "version": "2.0.4", @@ -2158,14 +2128,35 @@ "commondir": "1.0.1", "make-dir": "1.0.0", "pkg-dir": "2.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "2.1.0" + } + } } }, "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "requires": { - "locate-path": "2.0.0" + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" } }, "flat-cache": { @@ -2313,6 +2304,29 @@ } } }, + "github-slugger": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-1.1.3.tgz", + "integrity": "sha1-MUpudZoYwrDMV2DVEsy6tUnFSac=", + "requires": { + "emoji-regex": "6.1.1" + }, + "dependencies": { + "emoji-regex": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-6.1.1.tgz", + "integrity": "sha1-xs0OwbBkLio8Z6ETfvxeeW2k+I4=" + } + } + }, + "github-url-to-object": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/github-url-to-object/-/github-url-to-object-4.0.2.tgz", + "integrity": "sha1-EeIG1UJjtwGp47fMCaVbs4huDJc=", + "requires": { + "is-url": "1.2.2" + } + }, "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", @@ -2363,23 +2377,6 @@ "object-assign": "4.1.1", "pify": "2.3.0", "pinkie-promise": "2.0.1" - }, - "dependencies": { - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "2.0.4" - } - } } }, "got": { @@ -2488,6 +2485,14 @@ "agent-base": "2.1.1", "debug": "2.6.8", "extend": "3.0.1" + }, + "dependencies": { + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "dev": true + } } }, "hullabaloo-config-manager": { @@ -2510,6 +2515,26 @@ "pkg-dir": "2.0.0", "resolve-from": "3.0.0", "safe-buffer": "5.1.1" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "2.1.0" + } + } } }, "husky": { @@ -2569,6 +2594,26 @@ "requires": { "pkg-dir": "2.0.0", "resolve-cwd": "2.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "2.1.0" + } + } } }, "import-modules": { @@ -2934,8 +2979,7 @@ "is-url": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.2.tgz", - "integrity": "sha1-SYkFpZO/R8wtnn9zg3K792lsfyY=", - "dev": true + "integrity": "sha1-SYkFpZO/R8wtnn9zg3K792lsfyY=" }, "is-utf8": { "version": "0.2.1", @@ -3092,6 +3136,11 @@ "package-json": "4.0.1" } }, + "levenshtein-edit-distance": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/levenshtein-edit-distance/-/levenshtein-edit-distance-1.0.0.tgz", + "integrity": "sha1-iVuvR4zOi1waDSfkXXwdl4pmHkk=" + }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -3474,6 +3523,13 @@ "requires": { "p-locate": "2.0.0", "path-exists": "3.0.0" + }, + "dependencies": { + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + } } }, "lodash": { @@ -3772,6 +3828,14 @@ "unist-util-visit": "1.1.3" } }, + "mdast-util-definitions": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-1.2.2.tgz", + "integrity": "sha512-9NloPSwaB9f1PKcGqaScfqRf6zKOEjTIXVIbPOmgWI/JKxznlgVXC5C+8qgl3AjYg2vJBRgLYfLICaNiac89iA==", + "requires": { + "unist-util-visit": "1.1.3" + } + }, "mdast-util-heading-style": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/mdast-util-heading-style/-/mdast-util-heading-style-1.0.3.tgz", @@ -3800,16 +3864,6 @@ "trim-newlines": "1.0.0" }, "dependencies": { - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" - } - }, "load-json-file": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", @@ -3829,15 +3883,6 @@ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "2.0.1" - } - }, "path-type": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", @@ -3849,21 +3894,6 @@ "pinkie-promise": "2.0.1" } }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "2.0.4" - } - }, "read-pkg": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", @@ -4426,9 +4456,12 @@ "dev": true }, "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "requires": { + "pinkie-promise": "2.0.1" + } }, "path-is-absolute": { "version": "1.0.1", @@ -4476,18 +4509,16 @@ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" }, "pinkie": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-1.0.0.tgz", - "integrity": "sha1-Wkfyi6EBXQIBvae/DzWOR77Ix+Q=", - "dev": true + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" }, "pinkie-promise": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-1.0.0.tgz", - "integrity": "sha1-0dpn9UglY7t89X8oauKCLs+/NnA=", - "dev": true, + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "requires": { - "pinkie": "1.0.0" + "pinkie": "2.0.4" } }, "pkg-conf": { @@ -4498,15 +4529,25 @@ "requires": { "find-up": "2.1.0", "load-json-file": "2.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + } } }, "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", + "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", "requires": { - "find-up": "2.1.0" + "find-up": "1.1.2" } }, "pkg-up": { @@ -4516,6 +4557,17 @@ "dev": true, "requires": { "find-up": "2.1.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + } } }, "plur": { @@ -4593,6 +4645,14 @@ "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", "dev": true }, + "propose": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/propose/-/propose-0.0.5.tgz", + "integrity": "sha1-SKBl2ex9TIZn9AULFcSi2F28pWs=", + "requires": { + "levenshtein-edit-distance": "1.0.0" + } + }, "ps-tree": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.1.0.tgz", @@ -4686,6 +4746,16 @@ "requires": { "find-up": "2.1.0", "read-pkg": "2.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "2.0.0" + } + } } }, "readable-stream": { @@ -4843,6 +4913,14 @@ "unified-args": "4.0.0" } }, + "remark-comment-config": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/remark-comment-config/-/remark-comment-config-5.0.1.tgz", + "integrity": "sha1-FfWVhpM8S6tC9FRXlAKoE7hePgY=", + "requires": { + "mdast-comment-marker": "1.0.2" + } + }, "remark-lint": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/remark-lint/-/remark-lint-6.0.0.tgz", @@ -5257,6 +5335,16 @@ "unist-util-visit": "1.1.3" } }, + "remark-lint-no-heading-like-paragraph": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-heading-like-paragraph/-/remark-lint-no-heading-like-paragraph-1.0.0.tgz", + "integrity": "sha1-GpN9rjJht9x6gTHFQXGtH4W4+PY=", + "requires": { + "unified-lint-rule": "1.0.1", + "unist-util-generated": "1.1.1", + "unist-util-visit": "1.1.3" + } + }, "remark-lint-no-heading-punctuation": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/remark-lint-no-heading-punctuation/-/remark-lint-no-heading-punctuation-1.0.0.tgz", @@ -5312,6 +5400,17 @@ "unist-util-visit": "1.1.3" } }, + "remark-lint-no-multiple-toplevel-headings": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-multiple-toplevel-headings/-/remark-lint-no-multiple-toplevel-headings-1.0.0.tgz", + "integrity": "sha1-hglEyiGT/qWB58l4fWyxmjCxeaU=", + "requires": { + "unified-lint-rule": "1.0.1", + "unist-util-generated": "1.1.1", + "unist-util-position": "3.0.0", + "unist-util-visit": "1.1.3" + } + }, "remark-lint-no-paragraph-content-indent": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/remark-lint-no-paragraph-content-indent/-/remark-lint-no-paragraph-content-indent-1.0.2.tgz", @@ -5413,14 +5512,6 @@ "unist-util-visit": "1.1.3" }, "dependencies": { - "aria-query": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-0.3.0.tgz", - "integrity": "sha1-y4qZhOKGJxHIPICt5bj1yg3itGc=", - "requires": { - "ast-types-flow": "0.0.7" - } - }, "eslint-plugin-jsx-a11y": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-4.0.0.tgz", @@ -5558,6 +5649,16 @@ "xtend": "4.0.1" } }, + "remark-slug": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/remark-slug/-/remark-slug-4.2.3.tgz", + "integrity": "sha1-jZh9Dl5j1KSeo3uQ/pmaPc/IG3I=", + "requires": { + "github-slugger": "1.1.3", + "mdast-util-to-string": "1.0.4", + "unist-util-visit": "1.1.3" + } + }, "remark-stringify": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-4.0.0.tgz", @@ -5580,6 +5681,20 @@ "xtend": "4.0.1" } }, + "remark-validate-links": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/remark-validate-links/-/remark-validate-links-6.1.0.tgz", + "integrity": "sha512-rcKVuGbDcj+MJwN6TLJmBXJx9Mk7MBnArQjYZcG0988sE162vIYCgC07VeqCXLQ8TqjDRwSGpuxyP0vXYlt9jw==", + "requires": { + "github-url-to-object": "4.0.2", + "mdast-util-definitions": "1.2.2", + "propose": "0.0.5", + "remark-slug": "4.2.3", + "unist-util-visit": "1.1.3", + "urljoin": "0.1.5", + "xtend": "4.0.1" + } + }, "remove-trailing-separator": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz", @@ -5693,23 +5808,6 @@ "requires": { "pify": "2.3.0", "pinkie-promise": "2.0.1" - }, - "dependencies": { - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "2.0.4" - } - } } }, "run-async": { @@ -6296,30 +6394,6 @@ "pify": "2.3.0", "pinkie-promise": "2.0.1" } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "2.0.1" - } - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "2.0.4" - } } } }, @@ -6414,6 +6488,14 @@ "vfile": "2.2.0", "x-is-function": "1.0.4", "x-is-string": "0.1.0" + }, + "dependencies": { + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "dev": true + } } }, "unified-args": { @@ -6614,6 +6696,14 @@ "prepend-http": "1.0.4" } }, + "urljoin": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/urljoin/-/urljoin-0.1.5.tgz", + "integrity": "sha1-sl0sYRLFWsnVAJakmg8ft/T1OSE=", + "requires": { + "extend": "2.0.1" + } + }, "user-home": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", @@ -6876,6 +6966,21 @@ "xdg-basedir": "1.0.1" }, "dependencies": { + "pinkie": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-1.0.0.tgz", + "integrity": "sha1-Wkfyi6EBXQIBvae/DzWOR77Ix+Q=", + "dev": true + }, + "pinkie-promise": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-1.0.0.tgz", + "integrity": "sha1-0dpn9UglY7t89X8oauKCLs+/NnA=", + "dev": true, + "requires": { + "pinkie": "1.0.0" + } + }, "xdg-basedir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-1.0.1.tgz", @@ -6890,8 +6995,7 @@ "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" }, "yallist": { "version": "2.1.2", diff --git a/package.json b/package.json index 55eae3d..72b5322 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "remark-preset-lint-itgalaxy", - "version": "7.0.2", + "version": "8.0.0", "description": "Itgalaxy org's remark lint rules", "keywords": [ "remark", @@ -25,6 +25,7 @@ "index.js" ], "dependencies": { + "remark-comment-config": "^5.0.1", "remark-lint": "^6.0.0", "remark-lint-blockquote-indentation": "^1.0.0", "remark-lint-checkbox-character-style": "^1.0.0", @@ -64,11 +65,13 @@ "remark-lint-no-file-name-outer-dashes": "^1.0.0", "remark-lint-no-heading-content-indent": "^1.0.0", "remark-lint-no-heading-indent": "^1.0.0", + "remark-lint-no-heading-like-paragraph": "^1.0.0", "remark-lint-no-heading-punctuation": "^1.0.0", "remark-lint-no-html": "^1.0.0", "remark-lint-no-inline-padding": "^1.0.0", "remark-lint-no-literal-urls": "^1.0.0", "remark-lint-no-missing-blank-lines": "^1.0.0", + "remark-lint-no-multiple-toplevel-headings": "^1.0.0", "remark-lint-no-paragraph-content-indent": "^1.0.2", "remark-lint-no-reference-like-url": "^1.0.0", "remark-lint-no-shell-dollars": "^1.0.0", @@ -78,6 +81,7 @@ "remark-lint-no-tabs": "^1.0.0", "remark-lint-no-undefined-references": "^1.0.0", "remark-lint-no-unused-definitions": "^1.0.0", + "remark-lint-no-url-trailing-slash": "^3.0.0", "remark-lint-ordered-list-marker-style": "^1.0.0", "remark-lint-ordered-list-marker-value": "^1.0.0", "remark-lint-rule-style": "^1.0.0", @@ -86,7 +90,8 @@ "remark-lint-table-pipe-alignment": "^1.0.0", "remark-lint-table-pipes": "^1.0.0", "remark-lint-unordered-list-marker-style": "^1.0.0", - "remark-lint-no-url-trailing-slash": "^3.0.0" + "remark-message-control": "^4.0.1", + "remark-validate-links": "^6.1.0" }, "devDependencies": { "ava": "^0.21.0", @@ -116,9 +121,9 @@ "lint:remark": "remark . -i .gitignore -f -q", "lint": "npm-run-all -l -p lint:**", "prettier": "eslint . --fix --ignore-path .gitignore", - "ava": "ava --verbose \"__tests__/**/*.js\"", "pretest": "npm run lint", - "test": "npm run ava", + "test-only": "ava --verbose \"__tests__/**/*.js\"", + "test": "npm run test-only", "release": "npmpub" }, "eslintConfig": {