@jestaubach/eslint-config
@jestaubach/eslint-config is a set of shareable configs for ESLint.
Motivation
-
DRY principle - reuse the same eslint configurations across projects.
-
Enforce a consistent style amongst contributors to a project.
Installation
ESLint and the @jestaubach/eslint-config will be used in the development of other projects. Therefore, run the following npm command to install them as devDependencies of your project:
npm install eslint @jestaubach/eslint-config --save-dev
or
yarn add -D eslint @jestaubach/eslint-config
Configuration
Simply add an eslintConfig key to your package.json file, like so:
"eslintConfig": {
"extends": "@jestaubach/eslint-config"
},
Extend with additonal configurations:
"eslintConfig": {
"extends": [
"@jestaubach/eslint-config",
"@jestaubach/eslint-config/react"
]
},
Override specific rules:
"eslintConfig": {
"extends": "@jestaubach/eslint-config",
"rules": {
"max-len": [
"error",
{
"code": 80,
}
]
}
}