Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shinnn/all-eslint-rules
Get all available ESLint rules
https://github.com/shinnn/all-eslint-rules
Last synced: 26 days ago
JSON representation
Get all available ESLint rules
- Host: GitHub
- URL: https://github.com/shinnn/all-eslint-rules
- Owner: shinnn
- License: isc
- Created: 2015-09-03T11:20:44.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-06-26T19:19:50.000Z (over 5 years ago)
- Last Synced: 2024-10-11T02:05:11.020Z (about 1 month ago)
- Language: JavaScript
- Homepage: https://npm.runkit.com/all-eslint-rules
- Size: 131 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# all-eslint-rules
[![npm version](https://img.shields.io/npm/v/all-eslint-rules.svg)](https://www.npmjs.com/package/all-eslint-rules)
[![GitHub Actions](https://action-badges.now.sh/shinnn/all-eslint-rules)](https://wdp9fww0r9.execute-api.us-west-2.amazonaws.com/production/results/shinnn/all-eslint-rules)
[![codecov](https://codecov.io/gh/shinnn/all-eslint-rules/branch/master/graph/badge.svg)](https://codecov.io/gh/shinnn/all-eslint-rules)Get all available [ESLint](https://eslint.org) rules
```javascript
const allEslintRules = require('all-eslint-rules');allEslintRules();
//=> ['accessor-pairs', 'array-bracket-newline', 'array-bracket-spacing', ...]
```## Installation
[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).
```
npm install all-eslint-rules
```## API
```javascript
const allEslintRules = require('all-eslint-rules');
```### allEslintRules([*options*])
*options*: `Object | CLIEngine`
Return: `string[]`It returns an `Array` of available [ESLint](https://github.com/eslint/eslint) rule names – [the built-in ones](https://eslint.org/docs/rules/) and the ones defined by external [plugins](https://eslint.org/docs/user-guide/configuring#configuring-plugins). [Deprecated](https://eslint.org/docs/rules/#deprecated) rules are excluded.
```javascript
const rules = allEslintRules();// Both indent-legacy and no-spaced-func are deprecated.
rules.includes('indent-legacy'); //=> false
rules.includes('no-spaced-func'); //=> false
```The optional parameter accepts either a plain `Object` to set [`CLIEngine`](https://eslint.org/docs/developer-guide/nodejs-api#cliengine) options or an already instantiated `CLIEngine`, and affects the result.
```javascript
// When eslint-plugin-promise https://www.npmjs.com/package/eslint-plugin-promise is installedallEslintRules({
useEslintrc: false,
plugins: []
}).includes('promise/param-names'); //=> falseallEslintRules({
useEslintrc: false,
plugins: ['promise']
}).includes('promise/param-names'); //=> true
```## License
[ISC License](./LICENSE) © 2018 - 2019 Watanabe Shinnosuke