eslint-rule-docs

1.1.235 • Public • Published

eslint-rule-docs

Actions Status NPM

Find documentation url for a given ESLint rule. Updated daily!

Install

$ npm install eslint-rule-docs

Usage

const getRuleUrl = require('eslint-rule-docs');

// Find url for core rules
getRuleUrl('no-undef');
// => { exactMatch: true, url: 'https://eslint.org/docs/rules/no-undef' }

// Find url for known plugins
getRuleUrl('react/sort-prop-types');
// => { exactMatch: true, url: 'https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-prop-types.md' }

// If the plugin has no documentation, return repository url 
getRuleUrl('flowtype/semi');
// => { exactMatch: false, url: 'https://github.com/gajus/eslint-plugin-flowtype' }

// If the plugin is unknown, returns an empty object
getRuleUrl('unknown-foo/bar');
// => {}

License

Copyright (c) 2018–present Stefan Buck. Licensed under the MIT license.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.235
    225,860
    • latest

Version History

Package Sidebar

Install

npm i eslint-rule-docs

Weekly Downloads

263,509

Version

1.1.235

License

MIT

Unpacked Size

200 kB

Total Files

7

Last publish

Collaborators

  • stefanbuck