Socket
Socket
Sign inDemoInstall

all-eslint-rules

Package Overview
Dependencies
119
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    all-eslint-rules

Get all available ESLint rules


Version published
Weekly downloads
35
decreased by-50%
Maintainers
1
Install size
17.6 MB
Created
Weekly downloads
 

Readme

Source

all-eslint-rules

npm version GitHub Actions codecov

Get all available ESLint rules

const allEslintRules = require('all-eslint-rules');

allEslintRules();
//=> ['accessor-pairs', 'array-bracket-newline', 'array-bracket-spacing', ...]

Installation

Use npm.

npm install all-eslint-rules

API

const allEslintRules = require('all-eslint-rules');

allEslintRules([options])

options: Object | CLIEngine
Return: string[]

It returns an Array of available ESLint rule names – the built-in ones and the ones defined by external plugins. Deprecated rules are excluded.

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 options or an already instantiated CLIEngine, and affects the result.

// When eslint-plugin-promise https://www.npmjs.com/package/eslint-plugin-promise is installed

allEslintRules({
  useEslintrc: false,
  plugins: []
}).includes('promise/param-names'); //=> false

allEslintRules({
  useEslintrc: false,
  plugins: ['promise']
}).includes('promise/param-names'); //=> true

License

ISC License © 2018 - 2019 Watanabe Shinnosuke

Keywords

FAQs

Last updated on 26 Jun 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc