ESLint helps to format code and analyze it to make suggestions for improvement.
This is a quick guide to set it up on your VScode.
Step 1:
Install eslint globally
npm install -g eslint
Step 2:
Initialize an ESLint configuration by running
eslint --init
Step 3:
You will be prompted with a few different questions about your project to create the best configuration. Then you will also be asked to install extra packages; choose yes.
After that finishes, you should have a brand new .eslintrc file in your project
Top comments (1)
It's better to setup ESLint in devDependencies rather than a global command. This allows executing ESLint in continuous integration systems.
The challenging part is customizing
.eslintrc
though. Default rules are very loose.