A set of configurable ESLint configurations for meticulous people. Inspire by Meetic configuration
You have to install ESLint first and the configuration package
$ npm install --save-dev eslint eslint-config-pouloum
Install it globally if you want to use this configuration from command-line.
$ npm i -g eslint eslint-config-pouloum
If you use ESLint v2.X please install the last configuration that suits the previous major version
$ npm i -g eslint eslint-config-pouloum@2.2.0
This set of configs is meant to be extended on a per-project basis as necessary using ESLint's shareable configs.
- Add the extends attribute to your
.eslintrc
{
"extends": "pouloum"
}
- Or to the
eslintConfig
field of thepackage.json
of your project
{
"name": "your-project-name",
"eslintConfig": {
"extends": "pouloum"
}
}
- You can also use it from command line
$ eslint -c pouloum *.js
If the default configurations does not suit you, you can easily override it. Consult the ESLint documentation for more information about extending configuration files.
{
"extends": "pouloum",
// Override rule comes heres
"rules": {
"no-magic-numbers": 0
}
}
This package includes the following configurations:
If your project is written in ECMAScript-6, you can extend with the ES6 subset of configuration.
- extends the
ES5
configuration - set
sourceType
to module - add rules related to
ES6
(arrowFunctions
,classes
...) - enable all
ecmaFeatures
expectjsx
- overrides some rules (
no-underscore-dangle
...)
{
"extends": [
"pouloum/configurations/es6"
]
}
This is a collection of rules regarding possible errors, best practices, strict mode, variables and stylistic issues.
This configuration enforces neither
env
norglobals
settings. You may have to set individually on your project
{
"extends": "pouloum"
}
Extended configurations can't be used on its own.
- add the
browser
environment - overrides some rules (
no-console
...)
{
"extends": [
"pouloum",
"pouloum/configurations/browser"
]
}
- adds rules related to Node.js (
no-mixed-requires
,no-process-exit
...) - add the
node
environment - overrides some rules (
no-console
, ...)
{
"extends": [
"pouloum/configurations/es6",
"pouloum/configurations/server"
]
}
This configuration is base on the ESLint angular plugin therefore you have to install it before using this configuration:
$ npm install --save-dev eslint-plugin-angular
- collection of rules regarding possible errors, best practices, naming, deprecated features, conventions and wrappers
- extends the
browser
configuration
{
"extends": [
"pouloum",
"pouloum/configurations/angular"
]
}
The MIT License (MIT)