Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

eslint-docs

j-f11.5kISC0.4.0TypeScript support: included

Keep your rule names and descriptions up-to-date across your repo

eslint, cli

readme

eslint-docs

NPM version NPM version Build Status Codecov Greenkeeper enabled semantic-release

Keep your rule names and descriptions up-to-date across your repo

NPM

Installation

$ npm install --save-dev eslint-docs

Usage

In the shell

$ eslint-docs
✔ docs/rules/no-insecure-random.md is up-to-date
✔ docs/rules/no-stateless-class.md is up-to-date
✔ docs/rules/promise-must-complete.md is up-to-date
✔ README.md is up-to-date

$ eslint-docs check # Run this in CI!
✔ docs/rules/no-insecure-random.md is valid
✔ docs/rules/no-stateless-class.md is valid
✔ docs/rules/promise-must-complete.md is valid
✔ The README is valid

In package.json:

{
  "scripts": {
    "docs": "eslint-docs",
    "docs:check": "eslint-docs check"
  }
}

In a Node.js script

const eslintDocs = require('eslint-docs')

eslintDocs(yourProjectDirectory).then(
  () => {
    // Everything went OK!
  },
  () => {
    // Something went wrong!
    // Currently, you’ll have to ask the user to look at the terminal. sorry :(
  }
)

yourProjectDirectory defaults to the closest directory above process.cwd() that includes a package.json

License

ISC © Jed Fox

changelog

v0.4.x

v0.4.0

  • Allow use with scoped repositories
  • Enable semantic-release

v0.3.x

v0.3.1

Less output in CI (for real this time)

v0.3.0

Convert the codebase to TypeScript; extract the diff function to a separate package

v0.2.x

v0.2.7

Less output in CI

v0.2.6

Tell Prettier to ignore the table in the README

v0.2.5

v0.2.4

not published due to error

v0.2.3

🐛 Fix table output

v0.2.2

v0.2.1

not published due to error

v0.2.0

  • Update style in README to be a table (breaking)
  • Upgrade dependencies

v0.1.x

v0.1.3

🐛 install regenerator-runtime for async function support

v0.1.2 (💀)

  • Use the documentation file’s predominant newline style when inserting newlines (#7)
  • Remove babel-polyfill and fix the tests on Node v4

v0.1.1

Properly support the CLI on older versions of Node

v0.1.0

Add Babel to enable support for older Node versions.

v0.0.6

Allow specifying an Array for the extraDescription key; it will be .join(', ')ed before being added to the README.

v0.0.5

✨ Add support for an extraDescription key in the rule metadata specifying content that should go in () after the rule description in the README.

v0.0.4

✨ prefix the rule names with PLUGINNAME/ in the README

v0.0.3

🐛 unwrap Promise properly

v0.0.2

Actually publish the source code

v0.0.1

Initial release 🚀