Skip to content

Commit

Permalink
chore: install lint-staged
Browse files Browse the repository at this point in the history
  • Loading branch information
KawaiiZapic committed Mar 27, 2024
1 parent 186b859 commit 8211aca
Show file tree
Hide file tree
Showing 3 changed files with 249 additions and 13 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
27 changes: 14 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"eslint-plugin-prettier": "^5.1.3",
"fast-glob": "^3.3.2",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"mdui": "^2.0.6",
"nprogress": "^0.2.0",
"pjax": "^0.2.8",
Expand All @@ -31,21 +32,21 @@
"scripts": {
"dev": "vite build --watch --mode development",
"build": "vite build",
"prepare": "husky install",
"prepare": "husky install",
"type-check": "tsc --noEmit",
"lint": "eslint --max-warnings 0 . && stylelint --max-warnings 0 **/*.css",
"lint:fix": "eslint --max-warnings 0 --fix . && stylelint --max-warnings 0 --fix **/*.css && prettier --write -u --log-level silent ."
},
"lint-staged": {
"*.{cjs,js,ts}": [
"eslint --fix --max-warnings 0"
],
"*.{json,md,yml,yaml}": [
"prettier --ignore-unknown --write"
],
"*.css": [
"stylelint --fix --max-warnings 0",
"prettier --ignore-unknown --write"
]
}
"lint-staged": {
"*.{cjs,js,ts}": [
"eslint --fix --max-warnings 0"
],
"*.{json,md,yml,yaml}": [
"prettier --ignore-unknown --write"
],
"*.css": [
"stylelint --fix --max-warnings 0",
"prettier --ignore-unknown --write"
]
}
}
Loading

0 comments on commit 8211aca

Please sign in to comment.