-
-
Notifications
You must be signed in to change notification settings - Fork 309
Expand file tree
/
Copy path.oxlintrc.json
More file actions
110 lines (110 loc) · 3.52 KB
/
.oxlintrc.json
File metadata and controls
110 lines (110 loc) · 3.52 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
106
107
108
109
110
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"ignorePatterns": ["**/{cel,sql}Parser.{js,ts}", "examples/preact"],
"plugins": ["jest", "jsdoc", "oxc", "promise", "react-perf", "react", "typescript", "unicorn"],
"options": {
"typeAware": true,
"typeCheck": true,
"reportUnusedDisableDirectives": "warn"
},
"categories": {
"correctness": "error",
"suspicious": "warn",
"perf": "warn"
},
"settings": {
"jsdoc": {
"tagNamePreference": {
"defaultValue": "defaultValue",
"group": "group",
"typeParam": "typeParam"
}
}
},
"rules": {
"typescript/ban-ts-comment": "error",
"typescript/consistent-type-imports": "error",
"typescript/explicit-module-boundary-types": "off",
"typescript/no-empty-function": "off",
"typescript/no-explicit-any": "error",
"typescript/no-floating-promises": "off",
"typescript/no-misused-spread": "off",
"typescript/no-unnecessary-template-expression": "off",
"typescript/no-unsafe-type-assertion": "off",
"typescript/no-unused-vars": [
"error",
{ "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }
],
"typescript/require-array-sort-compare": "off",
"typescript/unbound-method": "off",
"jest/no-disabled-tests": "warn",
"jest/require-to-throw-message": "off",
"jest/valid-title": "off",
"react/display-name": "off",
"react/jsx-key": ["warn", { "checkKeyMustBeforeSpread": true }],
"react/react-in-jsx-scope": "error",
// TODO?: enable this when oxlint plugin is available
// "react-compiler/react-compiler": "error",
"unicorn/catch-error-name": "off",
"unicorn/consistent-function-scoping": "error",
"unicorn/filename-case": "off",
"unicorn/no-array-reduce": "off",
"unicorn/no-nested-ternary": "off",
"unicorn/no-new-array": "off",
"unicorn/no-null": "off",
"unicorn/prefer-global-this": "error",
"unicorn/prefer-module": "error",
"unicorn/prefer-node-protocol": "error",
"unicorn/prefer-number-properties": "error",
"unicorn/switch-case-braces": "off",
"unicorn/consistent-existence-index-check": "off"
},
"overrides": [
{
"files": [
"packages/*/src/**/*{ActionElement,DragHandle,MatchModeEditor,NotToggle,ShiftActions,ValueEditor,ValueSelector}.tsx"
],
// These are always leaf elements, so new functions/objects/arrays
// within their JSX have negligible performance impact.
"rules": {
"jsx-no-new-array-as-prop": "off",
"jsx-no-new-function-as-prop": "off",
"jsx-no-new-object-as-prop": "off"
}
},
{
"files": ["utils/testing/**", "*.test.ts", "*.test.tsx"],
"rules": {
"no-await-in-loop": "off",
"jsx-no-constructed-context-values": "off",
"jsx-no-new-array-as-prop": "off",
"jsx-no-new-function-as-prop": "off",
"jsx-no-new-object-as-prop": "off",
"unicorn/consistent-function-scoping": "off",
"unicorn/prefer-module": "off"
}
},
{
"files": ["babel.config.js", "utils/devapp/**"],
"rules": {
"unicorn/prefer-module": "off"
}
},
{
"files": ["examples/**"],
"rules": {
"react/react-in-jsx-scope": "off"
}
},
{
"files": ["website/**"],
"rules": {
"jsx-no-new-array-as-prop": "off",
"jsx-no-new-function-as-prop": "off",
"jsx-no-new-object-as-prop": "off",
"react/react-in-jsx-scope": "off",
"unicorn/prefer-module": "off"
}
}
]
}