eslint-config
Set of ESLint shareable config.
Installation
All the dependencies have to be installed explicitly (see eslint/eslint#3458
).
$ npm install @metahub/eslint-config eslint-config-prettier eslint-plugin-ava eslint-plugin-babel eslint-plugin-eslint-comments eslint-plugin-import eslint-plugin-jasmine eslint-plugin-json eslint-plugin-node eslint-plugin-prettier eslint-plugin-promise eslint-plugin-sort-class-members prettier eslint --save-dev
Alternatively you can use install-peerdeps:
$ npm install install-peerdeps --global
$ npm install @metahub/eslint-config --save-dev
$ install-peerdeps @metahub/eslint-config --dev
Usage
Once the @metahub/eslint-config
package is installed, you can use it by specifying the different configs in the extends
section of your ESLint configuration.
{
extends: [
'@metahub/eslint-config/es6-config',
'@metahub/eslint-config/node-config',
'@metahub/eslint-config/prettier-config',
],
rules: {
}
}
Config files
Name | Description | Extends |
---|
@metahub | Base/generic configuration | |
@metahub/eslint-config/jasmine-config | Rules specific to Jasmine | @metahub |
@metahub/eslint-config/import-config | Rules related to ECMAScript 2015 and Node imports | @metahub |
@metahub/eslint-config/node-config | Rules specific to Node JS | @metahub , import-config |
@metahub/eslint-config/es6-config | Rules specific to ECMAScript 2015 | @metahub , import-config |
@metahub/eslint-config/ava-config | Rules specific to AVA | @metahub , es6-config |
@metahub/eslint-config/promise-config | Rules specific to Promises | @metahub , es6-config |
@metahub/eslint-config/async-config | Rules specific to async/await | @metahub , promise-config |
@metahub/eslint-config/prettier-config | To be added last in the extends array when using prettier. Adds eslint-plugin-prettier and eslint-config-prettier | |