TreeviewCopyright © aleen42 all right reserved, powered by aleen42

Installation Back

According to official documents of ESLint, it can be installed through two ways: globally and locally.

So when should we install it globally or locally? It depends on the case whether you want it to be part of all projects or a single project.


If you want it to be installed in a single project, it's recommended to install locally:

npm install eslint --save-dev

Then set up a configuration file:

./node_modules/.bin/eslint --init

Then check the report of a JavaScript file with running:

./node_modules/.bin/eslint file.js


If you want to use ESLint in any project you have, you can just install it globally:

npm install -g eslint

Then set up a configuration for a project:

eslint --init

Then also check the report in the same way:

eslint file.js
Empty Comments
Sign in GitHub

As the plugin is integrated with a code management system like GitLab or GitHub, you may have to auth with your account before leaving comments around this article.

Notice: This plugin has used Cookie to store your token with an expiration.