Commit 991fd5f1 authored by Clement Bois's avatar Clement Bois
Browse files

chore: add pre-commit

parent 20fa824c
Loading
Loading
Loading
Loading

.husky/.gitignore

0 → 100644
+1 −0
Original line number Diff line number Diff line
_

.husky/pre-commit

0 → 100755
+4 −0
Original line number Diff line number Diff line
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run test
+18 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
    "": {
      "name": "gitlab-ci-test",
      "version": "1.0.0",
      "license": "LGPL-3.0-or-later",
      "license": "MIT",
      "dependencies": {
        "chai": "^5.1.2",
        "gitlab-ci-local": "^4.57.0",
@@ -22,6 +22,7 @@
        "c8": "^10.1.3",
        "eslint": "^9.20.0",
        "eslint-config-prettier": "^10.0.1",
        "husky": "^9.1.7",
        "npm-run-all": "^4.1.5",
        "prettier": "^3.5.0"
      }
@@ -2450,6 +2451,22 @@
        "node": ">=10.17.0"
      }
    },
    "node_modules/husky": {
      "version": "9.1.7",
      "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz",
      "integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==",
      "dev": true,
      "license": "MIT",
      "bin": {
        "husky": "bin.js"
      },
      "engines": {
        "node": ">=18"
      },
      "funding": {
        "url": "https://github.com/sponsors/typicode"
      }
    },
    "node_modules/iconv-lite": {
      "version": "0.6.3",
      "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
+5 −3
Original line number Diff line number Diff line
@@ -17,12 +17,13 @@
    "test:lint": "eslint .",
    "test:format": "prettier --check .",
    "format": "prettier --write .",
    "coverage": "c8 npm start test/*.test.*"
    "coverage": "c8 npm start test/*.test.*",
    "prepare": "husky || true"
  },
  "dependencies": {
    "chai": "^5.1.2",
    "gitlab-ci-local": "^4.57.0",
    "mocha": "^11.1.0",
    "chai": "^5.1.2"
    "mocha": "^11.1.0"
  },
  "devDependencies": {
    "@types/mocha": "^10.0.10",
@@ -30,6 +31,7 @@
    "c8": "^10.1.3",
    "eslint": "^9.20.0",
    "eslint-config-prettier": "^10.0.1",
    "husky": "^9.1.7",
    "npm-run-all": "^4.1.5",
    "prettier": "^3.5.0"
  },