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