Skip to content

Commit 1a303e2

Browse files
committed
Added husky and lintstaged
1 parent a7facdc commit 1a303e2

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

.husky/pre-commit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm run lint
5+
npx lint-staged

.lintstagedrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
'**/*.{md,json,yml,html,kr,cjs,mjs,js,ts,tsx,css,scss}': [
3+
'prettier --write --html-whitespace-sensitivity strict',
4+
],
5+
};

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"prebuild:prod": "npm run prepare:dist_folder",
2222
"build:prod": "nx build plugin --prod",
2323
"postbuild:prod": "npm run complete:dist",
24-
"copy:assets": "cp -R ./apps/plugin/src/assets/* ./dist/apps/plugin/",
24+
"prepare": "npx husky install",
2525
"test": "nx affected:test --all --parallel --maxParallel 10",
2626
"test:watch": "npm run test -- --watch",
2727
"tsc": "tsc --noEmit --project ./apps/plugin/tsconfig.app.json",
@@ -51,8 +51,10 @@
5151
"esbuild": "^0.19.2",
5252
"eslint": "~8.57.0",
5353
"eslint-config-prettier": "^9.0.0",
54+
"husky": "9.0.11",
5455
"jest": "^29.4.1",
5556
"jest-environment-node": "^29.4.1",
57+
"lint-staged": "13.1.4",
5658
"nx": "18.3.3",
5759
"prettier": "^2.6.2",
5860
"ts-jest": "^29.1.2",

0 commit comments

Comments
 (0)