1. Have installed
Eslint based on project (globally it is usually not put):
eslint npm install --save-dev
2. If necessary, set the configs and plugins.
I suggest to put the config
eslint-config-airbnb and the plugin
eslint-plugin-prettier.
3. If you are using
Flow or pilot chips
JS, vortex parser
, babel-eslint.
4. To create the rules file
.eslintrc. Example:
{
"extends": [
"airbnb",
"prettier",
],
"plugins": [
"prettier"
],
"parser": "babel-eslint",
"rules": {
/* write here the rules
* also, if you use configs,
* you probably will want some
* the rules used in them, disable,
* it can be done here
*/
}
}
5. To register in his
IDE the path to
Eslint and configuration file,
Webstorm finds the configuration and the local
ESLint in the project itself. How to do it in
NotePad++ look for yourself, most likely in the repository or on the website of the plugin has a configuration guide and comprehensive documentation.