DEV Community

Cover image for Quick set-up for ESLint
Temitope Ayodele
Temitope Ayodele

Posted on

2 1

Quick set-up for ESLint

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
Enter fullscreen mode Exit fullscreen mode

Step 2:
Initialize an ESLint configuration by running

eslint --init
Enter fullscreen mode Exit fullscreen mode

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)

Collapse
 
yoursunny profile image
Junxiao Shi

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.

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay