DEV Community

Ambika
Ambika

Posted on

EsLint SetUp

Inorder to install EsLint in your application , you need node.js in your system.

1.Install Node.js.
2.create project(workspace)
3.package.json should be there first for eslint.
4.npm init creates package.json
5.npm install eslint -g for installing globally
6.npm install eslint --save-dev for locally in the application
7.eslint -v gives version of eslint
8.eslint --init to create config file for eslint(it can be of type yaml, json, js).
9.eslintrc.json will be created and eslint dependency will be added in package.json

NOTE: In ESLint v9, the config file format defaults to the new flat config (e.g., eslint.config.js or .mjs), which is more flexible and powerful than the old .eslintrc format. And type is JavaScript (JS).

Top comments (0)