eslint-config-pouloum
A set of configurable ESLint configurations for meticulous people. Inspire by Meetic configuration
Installation
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
Usage
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
- Or to the
eslintConfig
field of thepackage.json
of your project
- You can also use it from command line
$ eslint -c pouloum *.js
Override
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
Available configurations
This package includes the following configurations:
Standalone
ES6 (default)
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
...)
ES5
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
Extended
Extended configurations can't be used on its own.
Browser
- add the
browser
environment - overrides some rules (
no-console
...)
Server
- adds rules related to Node.js (
no-mixed-requires
,no-process-exit
...) - add the
node
environment - overrides some rules (
no-console
, ...)
Angular
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
License
The MIT License (MIT)