Install ESLint your npm workspace to add static code linting.
[x] Add a npm script that runs ESLint to check if there is a problem
[x] Add a npm script that runs ESLint to fix existing problems
[x] Use this script in your GitHub action
Installation and Configuration
After you installed ESLint you first need to initialize it.
Run npx eslint --init which will then guide you through the configuration progress - see the recommended configuration below.
npx eslint --init
✔ How would you like to use ESLint? · style
✔ What type of modules does your project use? · none
✔ Which framework does your project use? · none
✔ Does your project use TypeScript? · No / Yes
✔ Where does your code run? · browser
✔ How would you like to define a style for your project? · guide
✔ Which style guide do you want to follow? · standard
✔ What format do you want your config file to be in? · JSON
Install ESLint your npm workspace to add static code linting.
Installation and Configuration
After you installed ESLint you first need to initialize it.
Run
npx eslint --init
which will then guide you through the configuration progress - see the recommended configuration below.