- Add this to devDependencies
$ npm i -D @bhws/eslint-config
# or
$ yarn add -D @bhws/eslint-config
- Install
eslint
if not already present locally or globally
$ npm i -D eslint
# or
$ yarn add -D eslint
-
Create a
.eslintrc
file -
Extend the config (you can use just the scope name as ESLint will assume the
eslint-config
prefix):
{
"extends": [
"bhws"
]
}
A full example .eslintrc
for a project with babel support:
Dont forget to
npm i -D babel-eslint
oryarn add -D babel-eslint
{
"root": true,
"parserOptions": {
"parser": "babel-eslint",
"sourceType": "module"
},
"extends": [
"bhws"
]
}
Setup inspired by @nuxtjs/eslint-config & eslint-config-standard