configured-eslint-rules
Detect configured ESLint rules
/* ./eslintrc.json: { "rules": { "no-alert": 2, "no-array-constructor": 1, "no-bitwise": 0, "linebreak-style": [2, "unix"], } }*/ const configuredESLintRules = ;const configured = ;//=> ['no-alert', 'no-array-constructor', 'no-bitwise', 'linebreak-style']
Installation
npm install configured-eslint-rules
API
const configuredEslintRules = ;
configuredEslintRules([options])
options: Object | CLIEngine
Return: string[]
It returns an Array
of the ESLint rule names that have rule configurations on a current working directory.
The optional parameter accepts either a plain Object
to set CLIEngine
options or an already instantiated CLIEngine
, and affects the result.
/* ./eslintrc.yml: rules: eqeqeq: 1*/ ; //=> ['eqeqeq'] ; //=> ['eqeqeq', 'curly']
License
ISC License © 2018 - 2019 Watanabe Shinnosuke