ESLint Configurations used at PlusTwo.
yarn add --dev eslint eslint-config-plustwo
This set of configs is meant to be extended on a per-project basis as necessary using ESLint's feature.
To start, you probably want to use pick plustwo
. You can then layer additional rulesets on top using eslint, the additive rules are:
This package includes the following configurations:
-
plustwo/react
(rules on React) -
plustwo/browser
(simply setsenv.browser
to true) -
plustwo/node
(enablesnode
environment and some rules)
By default, babel-eslint
is set as the parser.
Simply define your .eslintrc
(or add a eslintConfig
object to package.json
)
like so:
{
"extends": ["plustwo"]
}
Add any additional plugins you want, for example:
{
"extends": ["plustwo", "plustwo/browser"]
}
For more details about how shareable configs work, see the ESLint documentation.