@ianwremmel/eslint-config
Common eslint rules for @ianwremmel's projects
Install
npm install --save-dev @ianwremmel/eslint-config
Dependencies
ESLint doesn't support plugins in shareable configs, so you'll need to run the following script (borrowed from airbnb) to install the requisite peerDependencies.
(
export PKG=@ianwremmel/eslint-config
npm info "$PKG@latest" peerDependencies --json \
| command sed 's/[\{\},]//g ; s/: /@/g' \
| xargs npm install --save-dev "$PKG@latest"
)
Which produces and runs a command like:
npm install --save-dev @ianwremmel/eslint-config eslint@^#.#.# eslint-plugin-import@^#.#.# eslint-plugin-jsx-a11y@^#.#.# eslint-plugin-mocha@^#.#.# eslint-plugin-react@^#.#.#
Usage
Add the following to your eslintrc to use es2015 syntax without import/export
extends: "@ianwremmel"
Additional rules:
- @ianwremmel/eslint-config/es5
- @ianwremmel/eslint-config/esnext
- @ianwremmel/eslint-config/mocha
- @ianwremmel/eslint-config/script
Except for es5, all rulesets should be used in conjuction with the defaultor es5 and be listed after the ruleset with which they're combined.
Contribute
PRs generally accepted, but ruleset changes will require a detailed justification.