summaryrefslogtreecommitdiff
path: root/package.json
diff options
context:
space:
mode:
authorJoe Carstairs <jcarstairs@scottlogic.com>2023-08-02 19:27:53 +0100
committerJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-08-03 08:05:11 +0100
commitc20a25bb6886bbf0839408454b2541462f621631 (patch)
tree54389e68e2a3acb24ea2855e8ddba3cd45178877 /package.json
parentd7009367147fb8b841b9717c5807d04240292cdd (diff)
Runs lint-staged on pre-commit husky hook
Diffstat (limited to 'package.json')
-rw-r--r--package.json10
1 files changed, 8 insertions, 2 deletions
diff --git a/package.json b/package.json
index 66dd0f0..9a06a2e 100644
--- a/package.json
+++ b/package.json
@@ -2,14 +2,20 @@
"scripts": {
"lint": "eslint .",
"format": "prettier ./**/* --check",
- "format--write": "prettier ./**/* --write"
+ "format--write": "prettier ./**/* --write",
+ "prepare": "husky install"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.2.1",
"@typescript-eslint/parser": "^6.2.1",
"eslint": "^8.46.0",
"eslint-plugin-astro": "^0.28.0",
+ "husky": "^8.0.3",
+ "lint-staged": "^13.2.3",
"prettier": "^3.0.0",
"prettier-plugin-astro": "^0.11.0"
+ },
+ "lint-staged": {
+ "frontend/**/*.{ts,cts,mts,astro,json,md,js,cjs,mjs,html,css}": ["eslint", "prettier"]
}
-} \ No newline at end of file
+}