1.0.1 • Published 5 years ago
@orcinuss/eslint-config-eslint v1.0.1
Orcinuss's Eslint Config
Eslint Configuration for Orcinuss's NPM packages for code consistency and structure.
Installation
- Add eslint and this package to your repository
yarn add eslint @orcinuss/eslint-config-eslint -D
. - Create an
.eslintrc.js
file at the root of your project. - Add this package to the extends section of your
.eslintrc.js
file as show in the example below. - Add the executable script:
"lint": "eslint --config ./.eslintrc.js --fix index.js lib/**/*.js"
to your package.json scripts section.
Example Eslintrc
extends: [
'@orcinuss/eslint',
]
Included Options
This config already has the following keys present, so you don't need to repeat them:
parserOptions: {
ecmaVersion: 2018,
ecmaFeatures: {
experimentalObjectRestSpread: true,
},
},
env: {
es6: true,
node: true,
},
Caveats
Here are some common rules in specific locations that you may need to add:
- Disable global requires for
index.js
and*.spec.js
files:'global-require': 'off'
- Disable invalid
this
when using class transform properties:'no-invalid-this': 'off'
and'babel/no-invalid-this': 'off'