-
-
Notifications
You must be signed in to change notification settings - Fork 157
Expand file tree
/
Copy path.oxlintrc.json
More file actions
68 lines (68 loc) · 2.94 KB
/
Copy path.oxlintrc.json
File metadata and controls
68 lines (68 loc) · 2.94 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
{
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json",
"plugins": ["typescript", "oxc", "react", "react-hooks", "jsx-a11y", "nextjs", "import"],
"categories": {
"correctness": "error",
"suspicious": "error",
"perf": "warn",
"pedantic": "off",
"style": "off"
},
"rules": {
"react/react-in-jsx-scope": "off",
"react/no-unstable-nested-components": "off",
"import/no-unassigned-import": "off",
"import/no-named-as-default": "off",
"react-hooks/exhaustive-deps": "off",
"no-unused-vars": "off",
"no-underscore-dangle": "off",
"no-shadow": "off",
"no-control-regex": "off",
"jsx-a11y/no-static-element-interactions": "error",
"jsx-a11y/click-events-have-key-events": "error",
"jsx-a11y/label-has-associated-control": "error",
"jsx-a11y/prefer-tag-over-role": "error",
// no-autofocus is off by policy (#100): every autoFocus in the app is
// user-initiated focus management (inline editors, dialogs), not
// page-load focus stealing, and removing it would regress UX.
"jsx-a11y/no-autofocus": "off",
"jsx-a11y/control-has-associated-label": "error",
"jsx-a11y/no-noninteractive-element-interactions": "error",
"jsx-a11y/anchor-has-content": "error"
},
"overrides": [
{
"files": ["tests/**", "**/*.test.ts", "**/*.test.tsx"],
"rules": {
"typescript/no-extraneous-class": "off",
"no-useless-constructor": "off",
"no-new": "off",
"no-constant-binary-expression": "off"
}
},
{
// Vendored shadcn/ui primitives track upstream; fixing jsx-a11y findings
// in place would fork them and complicate future syncs (#100). App code
// outside this directory enforces these rules at error level.
//
// The same reasoning covers the React Compiler rules oxlint 1.79 promoted
// to error severity: carousel.tsx's embla `onSelect(api)` effect and
// sidebar.tsx's `Math.random()` skeleton width are both verbatim upstream
// shadcn, untouched here since the initial commit. Rewriting them would
// fork the primitives for no user-visible gain.
"files": ["src/components/ui/**"],
"rules": {
"react/set-state-in-effect": "off",
"react/purity": "off",
"jsx-a11y/no-static-element-interactions": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/label-has-associated-control": "off",
"jsx-a11y/prefer-tag-over-role": "off",
"jsx-a11y/control-has-associated-label": "off",
"jsx-a11y/no-noninteractive-element-interactions": "off",
"jsx-a11y/anchor-has-content": "off"
}
}
],
"ignorePatterns": ["dist/**", ".next/**", "public/monaco/**", "out/**", "build/**", "coverage/**", "node_modules/**", "snap-payload/**", "desktop/src-tauri/payload/**", "desktop/src-tauri/target/**", "desktop/src-tauri/bin/**", ".claude/**", "next-env.d.ts"]
}