Install the package with
npm install eslint-config-ns --save-dev
or
yarn add eslint-config-ns -D
Now add the config to either the package.json
:
{
"eslintConfig": {
"extends": "eslint-config-ns"
}
}
or to the .eslintrc
or .eslintrc.js
:
{
"extends": "eslint-config-ns"
}
- This ESLint configuration can work together with prettier, thanks to eslint-plugin-prettier
- the ESLint rules are based on the great work of airbnb's eslint-config-airbnb
- they also have a smaller more compact one: eslint-config-airbnb-base
- React environment (but can be used on a eg. node-server environment as well)
- Usage of jest as the test-suite
env
: Browser and Node environmentglobals
: added some related jest variablesparser
: usage of babel (used babel-eslint parser)
Note: you can still overwrite the env
, globals
and parser
in your local
.eslintrc.js
.
Stefan Natter |