ESLint > shareable config for my Javascript based projects - Mobile and Web
npm install --save-dev eslint-config-kbshl
Once the eslint-config-kbshl
package is installed, you can use it by
specifying ksbhl
in the
extends
section of your
ESLint configuration.
{
"extends": "kbshl",
"rules": {
// Additional, per-project rules...
}
}
Please note that most of the stylistic rules are disabled cause I use prettier to format my code. Therefore the eslint-config-prettier is included.
The default config actually is composed of several configurations and you can use those individually. These are the configs it's using:
You can use each of these configs yourself. Also, the es6
, import
,
promise
, security
configs each have a possible-errors.js
,
best-practices.js
(and stylistic.js
) which they are composed of as well.
Other configs are exposed also. You can use them standalone:
{
"extends": "kbshl/<config-name>"
}
or in combination with the base config (recommended):
{
"extends": [
"kbshl",
"kbshl/<config-name>"
]
}
- alloy - Copied and extended from
eslint-config-axway,
the
titanium
config is merged into this one - babel
- flowtype
- mobile - A merge of the
titanium
andalloy
configs - titanium - Copied and extended from eslint-config-axway
- All plugins needed for rules used by these configs are dependencies of this module so you don't have to install anything on your own.
- Almost all of the stylistic rules are disabled cause I use prettier to format my code. To ensure this the eslint-config-prettier is included too.
- eslint-config-prettier
- eslint-plugin-alloy
- eslint-plugin-babel
- eslint-plugin-flowtype
- eslint-plugin-import
- eslint-plugin-json
- eslint-plugin-promise
- eslint-plugin-security
MIT © Konstantin Büschel