forked from RetroAchievements/RAWeb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.oxlintrc.json
More file actions
128 lines (123 loc) · 3.25 KB
/
.oxlintrc.json
File metadata and controls
128 lines (123 loc) · 3.25 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["react", "typescript", "unicorn", "jsx-a11y", "import"],
"env": {
"browser": true
},
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"ignorePatterns": [
"**/generated.d.ts",
"**/ziggy.d.ts",
"**/ziggy.js",
"dist/**",
"node_modules/**",
"vendor/**",
"public/build/**",
"public/hot/**",
"storage/**",
"bootstrap/cache/**"
],
"jsPlugins": [
"eslint-plugin-testing-library",
"eslint-plugin-simple-import-sort",
"eslint-plugin-sort-keys-shorthand",
{
"name": "@tanstack/query",
"specifier": "@tanstack/eslint-plugin-query"
},
{
"name": "@retroachievements",
"specifier": "./resources/js/tools/eslint-rules/index.js"
}
],
"rules": {
"eqeqeq": "error",
"no-else-return": "error",
"no-return-await": "error",
"no-undef": "off",
"no-useless-escape": "off",
"object-shorthand": "error",
"no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
"no-constant-condition": [
"error",
{
"checkLoops": true
}
],
"no-restricted-imports": [
"error",
{
"paths": [
{
"name": "@inertiajs/react",
"importNames": ["Head"],
"message": "Use @/common/components/SEO instead."
},
{
"name": "@inertiajs/react",
"importNames": ["Link"],
"message": "Use @/common/components/InertiaLink instead."
}
],
"patterns": [
{
"group": ["@testing-library/react"],
"message": "Import from @/test instead."
},
{
"group": ["@radix-ui/*"],
"message": "Use our wrapped Base* components."
},
{
"group": ["radix-ui"],
"message": "Use our wrapped Base* components."
},
{
"group": ["sonner"],
"message": "Use toastMessage instead."
}
]
}
],
"typescript/no-explicit-any": "error",
"typescript/ban-ts-comment": "error",
"react/display-name": "off",
"react/jsx-no-leaked-render": "error",
"react/jsx-no-literals": "error",
"react/jsx-no-target-blank": "off",
"react/no-unescaped-entities": "off",
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
"react/rules-of-hooks": "error",
"react/exhaustive-deps": "error",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"unicorn/no-array-for-each": "error",
"unicorn/no-array-reduce": "error",
"unicorn/prefer-includes": "error",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"@retroachievements/enforce-typescript-in-app-code": "error",
"@retroachievements/no-cross-boundary-imports": "error"
},
"overrides": [
{
"files": ["**/*.test.ts", "**/*.test.tsx", "**/generated.d.ts"],
"rules": {
"typescript/no-explicit-any": "off",
"react/jsx-no-literals": "off"
}
}
]
}