ESLint is a tool for formatting (linting) your code. It analyze your code and warn you of any potential errors. In order for it to work, you need to configure it with specific rules. Luckily, Standard provides an ESLint configuration that anyone can use.
- First we need to install Node.js
- Inside your current project. Initialize npm configuration. Using this command.
npm init -y
- Now enable support for linting common JavaScript features. Paste this in your terminal
npm i -D eslint eslint-config-standard eslint-plugin-import eslint-plugin-node eslint-plugin-promise eslint-plugin-standard
- Now create a
.eslintrc.js
file, use this commandtouch .eslintrc.js