@earnest/eslint-config
v6.8.8
Published
Earnest's ESLint config, following our style guide
Downloads
2,892
Maintainers
Readme
eslint-config-earnest
Shareable ESLint configuration for the Earnest JavaScript style guide.
If you are looking for an ES7 version, look here.
Usage
Install the following
"devDependencies"
in your repo:npm i --save-dev @earnest/eslint-config@latest
Add a root level
.eslintrc
that references this packageecho '{ "extends": "@earnest/eslint-config" }' > .eslintrc
Add another
.eslintrc
to yourtest
folder that supports mochanpm install eslint-plugin-mocha --save-dev echo '{ "extends": "@earnest/eslint-config/mocha" }' > test/.eslintrc
(Recommended) Add the following entries to your
package.json
for simplified CLI access to linting:"scripts": { "lint": "./node_modules/.bin/eslint .", "lint-changed": "git diff --name-only --cached --relative | grep '\\.js$' | xargs ./node_modules/.bin/eslint" }
(Recommended) Setup your editor to support inline ESLint support. For Sublime Text, that means
npm install -g eslint
then installingSublimeLinter
andSublimeLinter-contrib-eslint
packages. For Vim, use Syntastic.