-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.oxlintrc.json
More file actions
105 lines (96 loc) Β· 3.44 KB
/
.oxlintrc.json
File metadata and controls
105 lines (96 loc) Β· 3.44 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
97
98
99
100
101
102
103
104
105
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["nextjs", "typescript", "react", "jsx-a11y", "import", "unicorn", "oxc", "promise", "node"],
"categories": {
"correctness": "warn",
"suspicious": "warn",
"perf": "warn"
},
"env": {
"browser": true,
"node": true,
"builtin": true
},
"options": {
"reportUnusedDisableDirectives": "warn"
},
"ignorePatterns": [".claude", ".next/**", ".velite/**", "out/**", "build/**", "dist/**"],
"rules": {
// TypeScript
"typescript/consistent-type-definitions": ["error", "type"],
"typescript/no-explicit-any": "error",
"typescript/no-inferrable-types": "error",
"typescript/no-duplicate-enum-values": "error",
"typescript/no-import-type-side-effects": "error",
"typescript/prefer-includes": "error",
"typescript/only-throw-error": "error",
"typescript/return-await": "error",
"typescript/no-deprecated": "warn",
// Correctness
"no-unused-vars": "warn",
"react-hooks/exhaustive-deps": "warn",
"array-callback-return": "error",
"no-self-compare": "error",
"no-constructor-return": "error",
"no-promise-executor-return": "error",
"eqeqeq": "error",
"react/rules-of-hooks": "error",
// Suspicious
"no-alert": "error",
"no-template-curly-in-string": "error",
"no-shadow-restricted-names": "error",
"no-unused-expressions": "error",
"no-empty": "error",
"no-proto": "error",
"no-return-assign": "error",
"no-multi-assign": "error",
"unicorn/no-document-cookie": "error",
// Unicorn
"unicorn/prefer-set-has": "error",
"unicorn/no-new-array": "warn",
"unicorn/no-useless-spread": "warn",
"unicorn/no-single-promise-in-promise-methods": "warn",
"unicorn/prefer-node-protocol": "error",
"unicorn/no-typeof-undefined": "error",
"unicorn/no-useless-promise-resolve-reject": "error",
"unicorn/prefer-array-some": "error",
"unicorn/no-object-as-default-parameter": "warn",
// Noisy rules - disable
"no-shadow": "off",
"no-await-in-loop": "off",
"unicorn/no-array-sort": "off",
"unicorn/prefer-add-event-listener": "off",
"unicorn/require-post-message-target-origin": "off",
"import/no-unassigned-import": "off",
"import/no-named-as-default": "off",
"import/no-named-as-default-member": "off",
"typescript/no-unsafe-type-assertion": "off",
// File size
"max-lines": ["warn", { "max": 300, "skipBlankLines": true, "skipComments": true }],
// Performance
"oxc/no-barrel-file": "error",
"import/no-cycle": "off",
// Next.js
"@next/next/no-html-link-for-pages": "error",
"@next/next/no-sync-scripts": "error",
"@next/next/inline-script-id": "error",
"@next/next/no-assign-module-variable": "error",
"@next/next/no-document-import-in-page": "error",
"@next/next/no-duplicate-head": "error",
"@next/next/no-head-import-in-document": "error",
"@next/next/no-script-component-in-head": "error",
"@next/next/no-img-element": "off",
// React
"react/jsx-no-target-blank": "off",
"react/no-unknown-property": "off",
"react/no-unsafe": "off",
"react/react-in-jsx-scope": "off",
// jsx-a11y
"jsx-a11y/alt-text": "warn",
"jsx-a11y/aria-props": "warn",
"jsx-a11y/aria-proptypes": "warn",
"jsx-a11y/aria-unsupported-elements": "warn",
"jsx-a11y/role-has-required-aria-props": "warn",
"jsx-a11y/role-supports-aria-props": "warn"
}
}