diff --git a/package-lock.json b/package-lock.json index 40d54cf..f2d8ba8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "eslint": "^8.45.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-prettier": "^5.0.0", + "husky": "^8.0.3", "mocha": "^10.2.0", "prettier": "^3.0.0", "typescript": "^5.1.6" @@ -1329,6 +1330,21 @@ "node": ">=14.18.0" } }, + "node_modules/husky": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", + "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", + "dev": true, + "bin": { + "husky": "lib/bin.js" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, "node_modules/ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", diff --git a/package.json b/package.json index 04a5d7a..694597c 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,12 @@ "dev": "tsc --watch", "build": "tsc", "test": "mocha --grep Emulator", - "lint": "eslint src --fix" + "lint": "eslint --ext .js,.ts src" + }, + "husky": { + "hooks": { + "pre-commit": "npm run lint" + } }, "author": { "name": "Pedro Gallardo", @@ -23,6 +28,7 @@ "eslint": "^8.45.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-prettier": "^5.0.0", + "husky": "^8.0.3", "mocha": "^10.2.0", "prettier": "^3.0.0", "typescript": "^5.1.6"