ESLint is a tool for “linting” your code. It can analyze your code and warn you of 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
npm init -y
- Now enable support for linting common JavaScript features. Past 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
.eslintrc.js
with the following contents