5.0.0 • Published 6 years ago
@earnest/eslint-config-es7 v5.0.0
eslint-config-earnest-es7
Earnest's ESLint config for ES7
Usage
Install the following
"devDependencies"in your repo:npm install @earnest/eslint-config-es7@latest babel-core babel-cli babel-eslint babel-preset-es2015 babel-preset-stage-3 eslint eslint-plugin-babel --save-devAdd a root level
.eslintrcthat references this packageecho '{"extends": "@earnest/eslint-config-es7"}' > .eslintrcAlternatively add this entry to your
package.json:"eslintConfig": { "extends": "@earnest/eslint-config-es7" }Add another
.eslintrcto yourtestfolder that supports mochanpm install eslint-plugin-mocha --save-dev echo '{"extends": "@earnest/eslint-config-es7/mocha"}' > test/.eslintrc(Recommended) Add the following entries to your
package.jsonfor simplified CLI access to linting:"scripts": { "lint": "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 --global eslintthen installingSublimeLinterandSublimeLinter-contrib-eslintpackages. For Vim, use ALE or Syntastic. (ALE is asynchronous and requires Vim 8.)
Linting this Repository
In order to run linting against this repository, you must create a self-referential link to this module:
npm install
npm link
npm link @earnest/eslint-config-es7
npm run lint