Skip to content

Commit 02937fc

Browse files
devmgnclaude
andauthored
chore: move oxlint custom rules to tools/ (#2663)
* chore: move oxlint custom rules from scripts/ to tools/ Rename scripts/oxlint-custom-rules/ to tools/oxlint-rules/ for better directory semantics — scripts/ is for executable utilities, tools/ for linter/formatter configuration. Update knip.jsonc and oxlint.config.ts references accordingly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix * fix --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6994bc3 commit 02937fc

9 files changed

Lines changed: 6 additions & 28 deletions

File tree

knip.jsonc

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,13 @@
11
{
22
"$schema": "./node_modules/knip/schema-jsonc.json",
3-
"ignore": ["src/**/openapi/**", "src/mocks/**", "scripts/**"],
3+
"ignore": ["scripts/**", "src/**/openapi/**", "src/mocks/**", "tools/**"],
44
"ignoreBinaries": ["openapiconfig.json"],
5-
"ignoreDependencies": [
6-
"@tanstack/eslint-plugin-query",
7-
"@testing-library/user-event",
8-
"eslint",
9-
"eslint-plugin-react-hooks",
10-
"eslint-plugin-storybook",
11-
"postcss",
12-
"postcss-load-config",
13-
],
14-
"oxlint": {
15-
"config": ["oxlint.config.ts", "oxfmt.config.ts"],
16-
},
17-
"storybook": {
18-
"entry": [
19-
".storybook/{preview,vitest.setup}.tsx",
20-
".storybook/SbProvider.tsx",
21-
"src/**/*.stories.@(js|jsx|ts|tsx)",
22-
],
23-
},
245
"tailwind": {
256
"entry": ["src/lib/styles/globals.css"],
267
},
278
"vitest": {
289
"entry": [
2910
"**/*.{test,spec}.{ts,tsx}",
30-
".storybook/vitest.setup.ts",
3111
"vitest.globalSetup.ts",
3212
"vitest.setup.ts",
3313
],

oxlint.config.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default defineConfig({
2626
"vitest",
2727
],
2828
jsPlugins: [
29-
"./scripts/oxlint-custom-rules/index.mjs",
29+
"./tools/oxlint-rules/index.mjs",
3030
"@tanstack/eslint-plugin-query",
3131
{ name: "react-compiler-rules", specifier: "eslint-plugin-react-hooks" },
3232
],
@@ -121,7 +121,7 @@ export default defineConfig({
121121
// ── eslint-plugin-unicorn (built-in) ──
122122
"unicorn/filename-case": [
123123
"error",
124-
{ cases: { camelCase: true, pascalCase: true } },
124+
{ cases: { camelCase: true, kebabCase: true, pascalCase: true } },
125125
],
126126
"unicorn/no-null": "off",
127127
"unicorn/no-useless-undefined": "off",
@@ -166,7 +166,7 @@ export default defineConfig({
166166
"react-compiler-rules/use-memo": "error",
167167
"react-compiler-rules/void-use-memo": "error",
168168

169-
// ── custom rules (jsPlugin: ./scripts/oxlint-custom-rules/) ──
169+
// ── custom rules (jsPlugin: ./tools/oxlint-rules/) ──
170170
"custom-rules/newline-after-import": "error",
171171
"custom-rules/no-index-tsx": "error",
172172
"custom-rules/no-top-level-arrow": "error",
@@ -232,7 +232,7 @@ export default defineConfig({
232232
},
233233
{
234234
// Scripts — plain .mjs files lack TS type info, so no-unsafe-* rules produce false positives
235-
files: ["scripts/**"],
235+
files: ["*.mjs"],
236236
rules: {
237237
"import/no-anonymous-default-export": "off",
238238
"import/no-default-export": "off",
@@ -243,7 +243,6 @@ export default defineConfig({
243243
"typescript/no-unsafe-member-access": "off",
244244
"typescript/no-unsafe-return": "off",
245245
"typescript/strict-boolean-expressions": "off",
246-
"unicorn/filename-case": "off",
247246
},
248247
},
249248
{
@@ -274,7 +273,6 @@ export default defineConfig({
274273
],
275274
rules: {
276275
"import/no-default-export": "off",
277-
"unicorn/filename-case": "off",
278276
},
279277
},
280278
],

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"lint:workflows": "actionlint -color && zizmor .github/",
1414
"fmt": "oxfmt --check .",
1515
"fmt:fix": "oxfmt --write .",
16-
"knip": "knip --strict --cache",
16+
"knip": "knip --strict",
1717
"test": "vitest run",
1818
"test:unit": "vitest run --project=unit",
1919
"test:update": "vitest run --update",

scripts/.gitkeep

Whitespace-only changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)