Answer the question
In order to leave comments, you need to log in
How to install eslint?
Hello! Help a newbie!
How to install eslint on local machine? For example, in the editor Notepad ++.
I found the plugin at sourceforge.net/projects/notepad-linter/, downloaded it, added it to the plugins folder.
I open the "Plugins-Linter-Edit config" tab, an empty linter.xml file opens.
What to do next? Need to look for a list of rules and manually add to this file?
Or what?
Answer the question
In order to leave comments, you need to log in
1. You need to install Eslint itself depending on the project (it is usually not installed globally):
2. If necessary, install configs and plugins.
I advise you to install the eslint-config-airbnb config and the eslint-plugin-prettier plugin .
3. If you use Flow or experimental JS features, install the babel-eslint parser .
4. Create a .eslintrc rules file . Example:
{
"extends": [
"airbnb",
"prettier",
],
"plugins": [
"prettier"
],
"parser": "babel-eslint",
"rules": {
/* тут пишите правила,
* так же при использовании конфигов,
* вам скорей всего захочется какие-то
* правила, используемые в них, отключить,
* это можно сделать тут
*/
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question