Skip to content

Commit 52f53c3

Browse files
committed
chore: add lint-staged
1 parent ee37b0b commit 52f53c3

3 files changed

Lines changed: 109 additions & 4 deletions

File tree

.oxfmtrc.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
{
22
"$schema": "https://oxc.rs/schemas/oxfmt.json",
3+
"jsdocPreferCodeFences": true,
4+
"tsdoc": true,
35
"printWidth": 100,
46
"tabWidth": 2,
57
"useTabs": false,
68
"semi": true,
79
"singleQuote": true,
8-
"trailingComma": "es5"
10+
"trailingComma": "es5",
11+
"experimentalSortPackageJson": false,
12+
"overrides": [
13+
{
14+
"files": ["packages/docs/**"],
15+
"options": {
16+
"printWidth": 80
17+
}
18+
}
19+
]
920
}

package.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,16 +134,17 @@
134134
"esbuild": "0.27.2",
135135
"eslint": "9.39.2",
136136
"eslint-plugin-qwik": "workspace:*",
137-
"oxfmt": "0.27.0",
138-
"oxlint": "1.42.0",
139137
"execa": "9.6.1",
140138
"express": "4.22.0",
141139
"globals": "17.0.0",
142140
"imagetools-core": "9.0.0",
143141
"install": "0.13.0",
142+
"lint-staged": "^16.3.0",
144143
"memfs": "4.51.1",
145144
"monaco-editor": "0.54.0",
146145
"mri": "1.2.0",
146+
"oxfmt": "0.27.0",
147+
"oxlint": "1.42.0",
147148
"path-browserify": "1.0.1",
148149
"prompts": "2.4.2",
149150
"rollup": "4.55.1",
@@ -255,8 +256,15 @@
255256
"update.qwik.builds": "node --require ./scripts/runBefore.ts scripts/update-qwik-builds.ts packages/docs && node scripts/update-qwik-builds.ts packages/insights; pnpm install",
256257
"vitest": "vitest"
257258
},
259+
"lint-staged": {
260+
"*.{js,jsx,ts,tsx,mjs,cjs}": [
261+
"oxfmt --write",
262+
"oxlint --quiet --deny-warnings"
263+
],
264+
"*.{json,jsonc,css,html,md,mdx,yaml,yml}": "oxfmt --write"
265+
},
258266
"simple-git-hooks": {
259-
"pre-commit": "pnpm fmt.staged"
267+
"pre-commit": "pnpm lint-staged"
260268
},
261269
"type": "module"
262270
}

pnpm-lock.yaml

Lines changed: 86 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)