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" + ] } }