diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..8f84f04 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npm run fix diff --git a/README.md b/README.md index 4080b23..27fa183 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![npm version](https://img.shields.io/npm/v/linkinator)](https://www.npmjs.org/package/linkinator) [![codecov](https://img.shields.io/codecov/c/github/JustinBeckwith/linkinator/main)](https://app.codecov.io/gh/JustinBeckwith/linkinator) -[![XO code style](https://shields.io/badge/code_style-5ed9c7?logo=xo&labelColor=gray)](https://github.com/xojs/xo) +[![Checked with Biome](https://img.shields.io/badge/Checked_with-Biome-60a5fa?style=flat&logo=biome)](https://biomejs.dev) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079)](https://github.com/semantic-release/semantic-release) diff --git a/package-lock.json b/package-lock.json index 3d91959..d5b449d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,6 +32,7 @@ "@types/sinon": "^17.0.0", "c8": "^10.0.0", "execa": "^9.0.0", + "husky": "^9.0.11", "mocha": "^10.0.0", "nock": "^13.2.1", "pkg": "^5.4.1", @@ -3178,6 +3179,21 @@ "node": ">=18.18.0" } }, + "node_modules/husky": { + "version": "9.0.11", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz", + "integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==", + "dev": true, + "bin": { + "husky": "bin.mjs" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", diff --git a/package.json b/package.json index 0f57187..8dc0aa9 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ }, "scripts": { "pretest": "npm run build", - "prepare": "npm run build", + "prepare": "husky && npm run build", "coverage": "c8 report --reporter=json", "build": "tsc -p .", "test": "c8 mocha build/test", @@ -43,6 +43,7 @@ "@types/sinon": "^17.0.0", "c8": "^10.0.0", "execa": "^9.0.0", + "husky": "^9.0.11", "mocha": "^10.0.0", "nock": "^13.2.1", "pkg": "^5.4.1", @@ -54,7 +55,9 @@ "engines": { "node": ">=18" }, - "files": ["build/src"], + "files": [ + "build/src" + ], "keywords": [ "404", "html",