This week I used ESlint to resolve over 150 issues in a game I created, GeoAsteroids. You can see the work in this PR. I also use a pre-commit hook to lint and format code pushing to remote. All I had to do was install a tool called Husky, and add a pre-commit file in the .github folder. pre-commit runs:

npm run lint-fix

which is defined in my package.json file,

// package.json
"scripts": {
  ...
  "lint": "eslint . --ext .js,.ts",
  "lint-fix": "eslint . --fix --ext .js,.ts",
},

lint-fix is run in the pre-commit hook and lint is run during the CI build process with Git Actions. This way, I fix the issues locally before the code is committed, and it's rechecked before it makes it into a remote branch.

Add a linter to your codebase today!