3.0.0 • Published 1 year ago
@brettz9/eslint-plugin v3.0.0
@brettz9/eslint-plugin
Additional ESLint rules and ESLint configurations. A fork of @mysticatea/eslint-plugin which extracts the rules without all of the config.
💿 Installation
npm install --save-dev eslint @brettz9/eslint-plugin📖 Usage
Add to your ESLint configuration: https://eslint.org/docs/user-guide/configuring#using-the-configuration-from-a-plugin
Configs
plugin:@brettz9/es5- Contains configuration of the project's rules suitable for ES5 (disabling arrow functions, etc.).plugin:@brettz9/es6- Contains configuration suitable for ES2015 and above. For setting ES6+ globals, you will need to setenvaccordingly.plugin:@brettz9/es2015- Alias fores6config.
Rules
- @brettz9/arrow-parens enforces parens of argument lists (excludes too redundant parens) (fixable).
- @brettz9/block-scoped-var handles variables which are declared by
vardeclaration as block-scoped. It disallows redeclarations, uses from outside of the scope, shadowing. - @brettz9/no-instanceof-array disallows 'instanceof' for Array (fixable).
- @brettz9/no-instanceof-wrapper disallows 'instanceof' for wrapper objects (fixable).
- @brettz9/no-literal-call disallows a call of a literal.
- @brettz9/no-this-in-static disallows
this/superin static methods. - @brettz9/no-use-ignored-vars disallows a use of ignored variables.
- @brettz9/no-useless-rest-spread disallows unnecessary rest/spread operators (fixable).
- @brettz9/prefer-for-of requires
for-ofstatements instead ofArray#forEachor something like (fixable).
🚥 Semantic Versioning Policy
This plugin follows semantic versioning and ESLint's Semantic Versioning Policy.
📰 Changelog
❤️ Contributing
Contributons are welcome!
Please use GitHub's Issues/PRs.
Development Tools
npm testruns tests and measures coverage.npm run cleanremoves the coverage result ofnpm testcommand.npm run coverageshows the coverage result ofnpm testcommand.npm run updateupdates auto-generated files.npm run watchruns tests and measures coverage when source code are changed.