Repository navigation
Expand file tree
/
Copy path.oxlintrc.json
More file actions
96 lines (96 loc) · 2.97 KB
/
Copy path.oxlintrc.json
File metadata and controls
96 lines (96 loc) · 2.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["typescript", "unicorn", "oxc", "react", "vitest"],
"categories": {
"correctness": "error"
},
"ignorePatterns": [
"**/.claude/worktrees",
"infra/cdk.out",
"infra/cloudfront-functions"
],
"rules": {
"curly": "error",
"no-unused-vars": [
"error",
{
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_"
}
],
// Oxlint 1.79 replaced the `react/react-compiler` nursery rule with 22
// category-specific ones, 12 of them in `correctness`. Four of those fire
// on deliberate patterns rather than on bugs, so they stay off until the
// code they flag is revisited on its own:
//
// - `incompatible-library` flags every call into react-hook-form's
// `form.register` / `form.watch` and @tanstack/react-virtual's
// `useVirtualizer`. It reports the library, not our use of it.
// - `refs` flags reading `ref.current` during render, which is the whole
// point of usePrevious / usePersistentValue / useLatestTruethyValue.
// - `immutability` flags ref forwarding (`ref.current = element`) inside
// callback refs.
// - `set-state-in-effect` has five hits worth looking at, but they are
// render-loop questions to answer one at a time, not a dependency bump.
"react/incompatible-library": "off",
"react/refs": "off",
"react/immutability": "off",
"react/set-state-in-effect": "off",
"unicorn/no-thenable": "off",
"vitest/no-conditional-expect": "off",
"vitest/no-standalone-expect": "off",
"vitest/prefer-snapshot-hint": "off",
"vitest/require-mock-type-parameters": "off",
"vitest/require-to-throw-message": "off"
},
"overrides": [
{
"files": ["**/*.test.ts", "**/*.test.mts", "**/*.test.tsx"],
"rules": {
"no-empty-pattern": "off",
"vitest/expect-expect": [
"error",
{
"assertFunctionNames": [
"expect",
"expectTypeOf",
"assert",
"assertType",
"expectHttpError",
"request.**.expect"
]
}
]
}
},
{
"files": ["apps/frontend/**"],
"excludeFiles": ["apps/frontend/src/ui/Toaster.tsx"],
"rules": {
"no-restricted-imports": [
"error",
{
"paths": [
{
"name": "sonner",
"message": "Import { toast, Toaster } from \"@/ui/Toaster\" instead, it handles theming and emphasizes duplicate toasts."
}
]
}
]
}
},
{
"files": ["apps/backend/src/**/*.ts", "apps/backend/src/**/*.tsx"],
"excludeFiles": [
"apps/backend/src/util/paths.ts",
"**/*.test.ts",
"**/*.test.tsx"
],
"jsPlugins": ["./tools/oxlint-plugin-argos.js"],
"rules": {
"argos/no-module-relative-paths": "error"
}
}
]
}