-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.oxlintrc.json
More file actions
81 lines (77 loc) · 2.88 KB
/
.oxlintrc.json
File metadata and controls
81 lines (77 loc) · 2.88 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
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["typescript", "react", "react-perf", "jsx-a11y"],
"env": {
"builtin": true,
"node": true,
"browser": true
},
"jsPlugins": [
"eslint-plugin-turbo",
{ "name": "react-hooks-js", "specifier": "eslint-plugin-react-hooks" },
// Plugins with "/" in name have to be aliased for now
// Issue: https://github.com/oxc-project/oxc/issues/14557
{
"name": "eslint-tanstack-router",
"specifier": "@tanstack/eslint-plugin-router"
},
{
"name": "eslint-tanstack-query",
"specifier": "@tanstack/eslint-plugin-query"
}
],
"rules": {
"no-deprecated": "warn",
"typescript/no-floating-promises": "off",
"typescript/no-misused-spread": "off",
"turbo/no-undeclared-env-vars": "warn",
"eslint-tanstack-router/create-route-property-order": "warn",
"eslint-tanstack-query/exhaustive-deps": "warn",
"eslint-tanstack-query/stable-query-client": "warn",
"eslint-tanstack-query/no-rest-destructuring": "warn",
"eslint-tanstack-query/no-unstable-deps": "warn",
"eslint-tanstack-query/infinite-query-property-order": "warn",
"eslint-tanstack-query/no-void-query-fn": "warn",
"eslint-tanstack-query/mutation-property-order": "warn",
// ref: https://github.com/TheAlexLichter/oxlint-react-compiler-rules/issues/1
// Recommended rules (from LintRulePreset.Recommended)
"react-hooks-js/component-hook-factories": "error",
"react-hooks-js/config": "error",
"react-hooks-js/error-boundaries": "error",
"react-hooks-js/gating": "error",
"react-hooks-js/globals": "error",
"react-hooks-js/immutability": "error",
"react-hooks-js/incompatible-library": "error",
"react-hooks-js/preserve-manual-memoization": "error",
"react-hooks-js/purity": "error",
"react-hooks-js/refs": "error",
"react-hooks-js/set-state-in-effect": "warn",
"react-hooks-js/set-state-in-render": "error",
"react-hooks-js/static-components": "error",
"react-hooks-js/unsupported-syntax": "error",
"react-hooks-js/use-memo": "error",
// Recommended-latest rules (from LintRulePreset.RecommendedLatest)
"react-hooks-js/void-use-memo": "error",
// Off rules (LintRulePreset.Off) - not enabled by default
"react-hooks-js/automatic-effect-dependencies": "off",
"react-hooks-js/capitalized-calls": "off",
"react-hooks-js/fbt": "off",
"react-hooks-js/fire": "off",
"react-hooks-js/hooks": "off",
"react-hooks-js/invariant": "off",
"react-hooks-js/memoized-effect-dependencies": "off",
"react-hooks-js/no-deriving-state-in-effects": "off",
"react-hooks-js/rule-suppression": "off",
"react-hooks-js/syntax": "off",
"react-hooks-js/todo": "off"
},
"ignorePatterns": [
"dist",
".wrangler",
".vercel",
".output",
"build/",
"worker-configuration.d.ts",
"scripts/"
]
}