From 03f7119f65703c89642e0ecc6a3ed2f795d2e215 Mon Sep 17 00:00:00 2001 From: Ayo Ayco Date: Fri, 27 Dec 2024 21:48:23 +0100 Subject: [PATCH] chore: test precommit --- .husky/pre-commit | 2 +- eslint.config.mjs | 4 ++++ package.json | 9 +++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 2e55e2c..1d85c20 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,2 +1,2 @@ npm run test:cli run -npm run check +npx lint-staged diff --git a/eslint.config.mjs b/eslint.config.mjs index 8788fa1..72f5320 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -8,6 +8,10 @@ const __filename = fileURLToPath(import.meta.url) const __dirname = path.dirname(__filename) const gitignorePath = path.resolve(__dirname, '.gitignore') +const unused = 'hey' + +console.log(unused) + /** @type {import('eslint').Linter.Config[]} */ export default [ { languageOptions: { globals: { ...globals.browser, ...globals.node } } }, diff --git a/package.json b/package.json index 0986ca1..bd4d922 100644 --- a/package.json +++ b/package.json @@ -24,5 +24,14 @@ "husky": "^9.1.7", "prettier": "^3.4.2", "vitest": "^2.1.8" + }, + "lint-staged": { + "*.{js,mjs,astro,ts}": [ + "prettier --write", + "eslint --fix" + ], + "*.json": [ + "prettier --write" + ] } }