Skip to content

Commit

Permalink
chore: use lint-staged instead of pretty-quick
Browse files Browse the repository at this point in the history
  • Loading branch information
greenhat616 committed Dec 1, 2023
1 parent 1554ed7 commit a48cb6d
Show file tree
Hide file tree
Showing 4 changed files with 228 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

pnpm pretty-quick --staged
pnpm lint-staged
17 changes: 17 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
"*.{js,cjs,.mjs,jsx}": ["prettier --write", "eslint --cache --fix"],
"*.{ts,tsx}": [
"prettier --write",
"eslint --cache --fix",
() => "tsc -p tsconfig.json --noEmit",
],
"backend/**/*.{rs,toml}": [
() =>
"cargo clippy --manifest-path=./backend/Cargo.toml --all-targets --all-features",
// () => 'cargo test --manifest-path=./backend/Cargo.toml',
() => "cargo fmt --manifest-path=./backend/Cargo.toml --all",
],
"*.{html,sass,scss,less}": ["prettier --write", "stylelint --fix"],
"package.json": ["prettier --write"],
"*.{md,json,jsonc,json5,yaml,yml,toml}": ["prettier --write"],
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
"fs-extra": "^10.0.0",
"https-proxy-agent": "^5.0.1",
"husky": "^7.0.0",
"lint-staged": "15.1.0",
"node-fetch": "^3.2.6",
"npm-run-all": "4.1.5",
"picocolors": "1.0.0",
Expand Down
Loading

0 comments on commit a48cb6d

Please sign in to comment.