eslint-plugin-xo
ESLint rules for XO
This plugin is bundled with XO, but can still be useful if you don't use XO.
Install
$ npm install --save-dev eslint eslint-plugin-xo
Usage
Configure it in package.json
.
Rules
- catch-error-name - Enforce a specific parameter name in catch clauses.
- explicit-length-check - Enforce explicitly comparing the
length
property of a value. - filename-case - Enforce a case style for filenames.
- no-abusive-eslint-disable - Enforce specifying rules to disable in
eslint-disable
comments. - no-process-exit - Disallow
process.exit()
. - throw-new-error - Require
new
when throwing an error. (fixable)
Recommended config
This plugin exports a recommended
config that enforces good practices.
Enable it in your package.json
with the extends
option:
See the ESLint docs for more information about extending config files.
Note: This config will also enable the correct parser options and environment.
Created by
License
MIT © Sindre Sorhus