---
canonical: "https://www.jsolly.com/blog/I-resolved-150-linting-issues-with-eslint/"
title: "Using ESlint and Husky to Improve Code Quality in a Game Project"
description: "ESlint helps you find errors in your JavaScript code. It's also can format code to make it easier to read. Everyone should use a linter!"
author: "John Solly"
published: "2022-07-19T21:26:56.510Z"
updated: "2026-09-07T14:25:05.488Z"
---

<a id="using-eslint-and-husky-to-improve-code-quality-in-a-game-project"></a>

# Using ESlint and Husky to Improve Code Quality in a Game Project

![Eslint logo](https://d1d7p8ufhgz4ld.cloudfront.net/media/post_metaimgs/eslint.webp)

This week I used ESlint to resolve over 150 issues in a game I created, [GeoAsteroids](https://github.com/jsolly/GeoRoids). You can see the work in [this PR](https://github.com/jsolly/GeoAsteroids/pull/20/files). 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:

<pre><code class="language-bash">npm run lint-fix</code></pre>

which is defined in my package.json file,

<pre><code class="language-json">// package.json
"scripts": {
  ...
  "lint": "eslint . --ext .js,.ts",
  "lint-fix": "eslint . --fix --ext .js,.ts",
},</code></pre>

`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!

July 19, 2022 in [Dev Tools](https://www.jsolly.com/blog/category/dev-tools/)

Updated September 7, 2026
