Skip to content

Commit af1cc66

Browse files
authored
chore: run oxlint --fix-dangerously in pre-commit hook (tldraw#8414)
In order to catch unused imports and formatting issues before they reach CI, this PR adds `oxlint --fix-dangerously` to the lint-staged pre-commit config for JS/TS files. It runs before `oxfmt --write` so formatting stays clean after auto-fixes. ### Change type - [x] `improvement` ### Test plan 1. Stage a file with an unused import 2. Commit — the pre-commit hook should remove the unused import and reformat 3. Verify the committed file has no unused import and is properly formatted ### Code changes | Section | LOC change | | -------------- | ---------- | | Config/tooling | +5 / -1 |
1 parent 2cb294e commit af1cc66

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,11 @@
8383
},
8484
"packageManager": "yarn@4.12.0",
8585
"lint-staged": {
86-
"*.{js,jsx,ts,tsx,cjs,mjs,css,md,mdx,html,yml,yaml}": [
86+
"*.{js,jsx,ts,tsx}": [
87+
"oxlint --fix-dangerously --no-error-on-unmatched-pattern",
88+
"oxfmt --write --no-error-on-unmatched-pattern"
89+
],
90+
"*.{cjs,mjs,css,md,mdx,html,yml,yaml}": [
8791
"oxfmt --no-error-on-unmatched-pattern"
8892
]
8993
},

0 commit comments

Comments
 (0)