@scaleway/oxlint-config 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +21 -0
- package/README.md +66 -0
- package/configs/index.json +263 -0
- package/configs/react.json +52 -0
- package/configs/typescript.json +38 -0
- package/configs/vitest.json +33 -0
- package/package.json +45 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Scaleway
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# @scaleway/oxlint-config
|
|
2
|
+
|
|
3
|
+
Scaleway's shareable configuration for [oxlint](https://oxc.rs/docs/guide/usage/linter.html).
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install --save-dev @scaleway/oxlint-config
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
Create a `.oxlintrc.json` file in your project root:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"extends": ["@scaleway/oxlint-config"]
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Framework-Specific Configurations
|
|
22
|
+
|
|
23
|
+
#### React
|
|
24
|
+
|
|
25
|
+
For React projects, extend the React configuration:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"extends": ["@scaleway/oxlint-config", "@scaleway/oxlint-config/react"]
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
#### TypeScript
|
|
34
|
+
|
|
35
|
+
For TypeScript projects, extend the TypeScript configuration:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"extends": ["@scaleway/oxlint-config", "@scaleway/oxlint-config/typescript"]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
#### Combined React and TypeScript
|
|
45
|
+
|
|
46
|
+
For React projects using TypeScript, extend both configurations:
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"extends": [
|
|
51
|
+
"@scaleway/oxlint-config",
|
|
52
|
+
"@scaleway/oxlint-config/react",
|
|
53
|
+
"@scaleway/oxlint-config/typescript"
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Available Configurations
|
|
59
|
+
|
|
60
|
+
1. **Base rules** (`@scaleway/oxlint-config`): Core rules for all JavaScript/TypeScript projects
|
|
61
|
+
2. **React rules** (`@scaleway/oxlint-config/react`): React-specific rules
|
|
62
|
+
3. **TypeScript rules** (`@scaleway/oxlint-config/typescript`): TypeScript-specific rules
|
|
63
|
+
|
|
64
|
+
## License
|
|
65
|
+
|
|
66
|
+
MIT
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../node_modules/oxlint/configuration_schema.json",
|
|
3
|
+
"plugins": [
|
|
4
|
+
"import",
|
|
5
|
+
"node",
|
|
6
|
+
"oxc",
|
|
7
|
+
"unicorn"
|
|
8
|
+
],
|
|
9
|
+
"categories": {
|
|
10
|
+
"correctness": "deny",
|
|
11
|
+
"style": "deny",
|
|
12
|
+
"suspicious": "deny",
|
|
13
|
+
"perf": "deny",
|
|
14
|
+
"pedantic": "deny",
|
|
15
|
+
"restriction": "deny",
|
|
16
|
+
"nursery": "off"
|
|
17
|
+
},
|
|
18
|
+
"rules": {
|
|
19
|
+
"eslint/no-named-export": "off",
|
|
20
|
+
"eslint/array-callback-return": "error",
|
|
21
|
+
"eslint/constructor-super": "error",
|
|
22
|
+
"eslint/default-case-last": "error",
|
|
23
|
+
"eslint/default-param-last": "off",
|
|
24
|
+
"eslint/eqeqeq": "error",
|
|
25
|
+
"eslint/for-direction": "error",
|
|
26
|
+
"eslint/getter-return": "error",
|
|
27
|
+
"eslint/guard-for-in": "error",
|
|
28
|
+
"eslint/id-length": "off",
|
|
29
|
+
"eslint/max-classes-per-file": "error",
|
|
30
|
+
"eslint/max-lines": "off",
|
|
31
|
+
"eslint/max-params": "off",
|
|
32
|
+
"eslint/new-cap": "off",
|
|
33
|
+
"eslint/no-array-constructor": "error",
|
|
34
|
+
"eslint/no-async-promise-executor": "error",
|
|
35
|
+
"eslint/no-await-in-loop": "off",
|
|
36
|
+
"eslint/no-bitwise": "error",
|
|
37
|
+
"eslint/no-caller": "error",
|
|
38
|
+
"eslint/no-implicit-coercion": ["error", { "allow": ["!!"] }],
|
|
39
|
+
"eslint/no-case-declarations": "error",
|
|
40
|
+
"eslint/no-class-assign": "error",
|
|
41
|
+
"eslint/no-compare-neg-zero": "error",
|
|
42
|
+
"eslint/no-cond-assign": "error",
|
|
43
|
+
"eslint/no-console": "error",
|
|
44
|
+
"eslint/no-const-assign": "error",
|
|
45
|
+
"eslint/no-constant-binary-expression": "error",
|
|
46
|
+
"eslint/no-constant-condition": "error",
|
|
47
|
+
"eslint/no-continue": "error",
|
|
48
|
+
"eslint/no-control-regex": "error",
|
|
49
|
+
"eslint/no-debugger": "error",
|
|
50
|
+
"eslint/no-delete-var": "error",
|
|
51
|
+
"eslint/no-dupe-class-members": "error",
|
|
52
|
+
"eslint/no-dupe-else-if": "error",
|
|
53
|
+
"eslint/no-dupe-keys": "error",
|
|
54
|
+
"eslint/no-duplicate-case": "error",
|
|
55
|
+
"eslint/no-duplicate-imports": "off",
|
|
56
|
+
"eslint/no-empty": "error",
|
|
57
|
+
"eslint/no-empty-character-class": "error",
|
|
58
|
+
"eslint/no-empty-function": "off",
|
|
59
|
+
"eslint/no-empty-pattern": "error",
|
|
60
|
+
"eslint/no-empty-static-block": "error",
|
|
61
|
+
"eslint/no-eq-null": "error",
|
|
62
|
+
"eslint/no-eval": "error",
|
|
63
|
+
"eslint/no-ex-assign": "error",
|
|
64
|
+
"eslint/no-extra-boolean-cast": "error",
|
|
65
|
+
"eslint/no-fallthrough": "error",
|
|
66
|
+
"eslint/no-func-assign": "error",
|
|
67
|
+
"eslint/no-global-assign": "error",
|
|
68
|
+
"eslint/no-import-assign": "error",
|
|
69
|
+
"eslint/no-inner-declarations": "error",
|
|
70
|
+
"eslint/no-irregular-whitespace": "error",
|
|
71
|
+
"eslint/no-iterator": "error",
|
|
72
|
+
"eslint/no-loss-of-precision": "error",
|
|
73
|
+
"eslint/no-magic-numbers": "off",
|
|
74
|
+
"eslint/no-mixed-operators": "error",
|
|
75
|
+
"eslint/no-new-native-nonconstructor": "error",
|
|
76
|
+
"eslint/no-new-symbol": "error",
|
|
77
|
+
"eslint/no-new-wrappers": "error",
|
|
78
|
+
"eslint/no-nonoctal-decimal-escape": "error",
|
|
79
|
+
"eslint/no-obj-calls": "error",
|
|
80
|
+
"eslint/no-proto": "error",
|
|
81
|
+
"eslint/no-prototype-builtins": "error",
|
|
82
|
+
"eslint/no-redeclare": "error",
|
|
83
|
+
"eslint/no-regex-spaces": "error",
|
|
84
|
+
"eslint/no-return-await": "error",
|
|
85
|
+
"eslint/no-script-url": "error",
|
|
86
|
+
"eslint/no-self-assign": "error",
|
|
87
|
+
"eslint/no-self-compare": "error",
|
|
88
|
+
"eslint/no-setter-return": "error",
|
|
89
|
+
"eslint/no-shadow-restricted-names": "error",
|
|
90
|
+
"eslint/no-sparse-arrays": "error",
|
|
91
|
+
"eslint/no-template-curly-in-string": "error",
|
|
92
|
+
"eslint/no-ternary": "off",
|
|
93
|
+
"eslint/no-this-before-super": "error",
|
|
94
|
+
"eslint/no-undef": "off",
|
|
95
|
+
"eslint/no-undefined": "off",
|
|
96
|
+
"eslint/no-unsafe-finally": "error",
|
|
97
|
+
"eslint/no-unsafe-negation": "error",
|
|
98
|
+
"eslint/no-unsafe-optional-chaining": "error",
|
|
99
|
+
"eslint/no-unused-labels": "error",
|
|
100
|
+
"eslint/no-unused-private-class-members": "error",
|
|
101
|
+
"eslint/no-unused-vars": [
|
|
102
|
+
"error",
|
|
103
|
+
{
|
|
104
|
+
"ignoreRestSiblings": true
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"eslint/no-useless-catch": "error",
|
|
108
|
+
"eslint/no-useless-escape": "error",
|
|
109
|
+
"eslint/no-useless-rename": "error",
|
|
110
|
+
"eslint/no-var": "error",
|
|
111
|
+
"eslint/no-void": "error",
|
|
112
|
+
"eslint/no-with": "error",
|
|
113
|
+
"eslint/radix": "error",
|
|
114
|
+
"eslint/require-await": "off",
|
|
115
|
+
"eslint/require-yield": "error",
|
|
116
|
+
"eslint/sort-imports": [
|
|
117
|
+
"off",
|
|
118
|
+
{
|
|
119
|
+
"ignoreDeclarationSort": true,
|
|
120
|
+
"memberSyntaxSortOrder": ["single", "multiple", "all", "none"]
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"eslint/unicode-bom": "error",
|
|
124
|
+
"eslint/use-isnan": "error",
|
|
125
|
+
"eslint/valid-typeof": "error",
|
|
126
|
+
"eslint/init-declarations": "off",
|
|
127
|
+
"eslint/func-style": "off",
|
|
128
|
+
"eslint/no-inline-comments": "off",
|
|
129
|
+
"eslint/max-lines-per-function": "off",
|
|
130
|
+
"eslint/max-nested-callbacks": "off",
|
|
131
|
+
"eslint/no-warning-comments": "off",
|
|
132
|
+
"eslint/max-depth": "off",
|
|
133
|
+
"eslint/prefer-destructuring": "off",
|
|
134
|
+
"eslint/react-in-jsx-scope": "off",
|
|
135
|
+
"eslint/sort-keys": "off",
|
|
136
|
+
"eslint/yoda": "error",
|
|
137
|
+
"import/consistent-type-specifier-style": "error",
|
|
138
|
+
"import/default": "error",
|
|
139
|
+
"import/export": "error",
|
|
140
|
+
"import/exports-last": "off",
|
|
141
|
+
"import/group-exports": "off",
|
|
142
|
+
"import/import-no-namespace": "off",
|
|
143
|
+
"import/max-dependencies": "off",
|
|
144
|
+
"eslint/max-statements":["error", {
|
|
145
|
+
"max": 20
|
|
146
|
+
}],
|
|
147
|
+
"import/named": "error",
|
|
148
|
+
"import/namespace": "off",
|
|
149
|
+
"import/no-amd": "error",
|
|
150
|
+
"import/no-cycle": "error",
|
|
151
|
+
"import/no-default-export": "off",
|
|
152
|
+
"import/no-duplicates": "error",
|
|
153
|
+
"import/no-named-export": "off",
|
|
154
|
+
"import/no-named-as-default": "error",
|
|
155
|
+
"import/no-named-as-default-member": "error",
|
|
156
|
+
"import/no-self-import": "error",
|
|
157
|
+
"import/no-unassigned-import": "error",
|
|
158
|
+
"import/no-unused-modules": "off",
|
|
159
|
+
"import/prefer-default-export": "off",
|
|
160
|
+
"import/unambiguous": "error",
|
|
161
|
+
"oxc/bad-bitwise-operator": "error",
|
|
162
|
+
"oxc/no-accumulating-spread": "off",
|
|
163
|
+
"oxc/no-async-await": "off",
|
|
164
|
+
"oxc/no-map-spread": "off",
|
|
165
|
+
"oxc/no-barrel-file": "off",
|
|
166
|
+
"oxc/no-const-enum": "error",
|
|
167
|
+
"oxc/no-optional-chaining": "off",
|
|
168
|
+
"oxc/no-rest-spread-properties": "off",
|
|
169
|
+
|
|
170
|
+
"unicorn/no-instanceof-builtins": "error",
|
|
171
|
+
"unicorn/prefer-array-index-of": "off",
|
|
172
|
+
"unicorn/prefer-array-find": "off",
|
|
173
|
+
"unicorn/no-for-loop": "off",
|
|
174
|
+
"unicorn/prefer-object-from-entries": "off",
|
|
175
|
+
"unicorn/prefer-global-this": "error",
|
|
176
|
+
"unicorn/catch-error-name": "error",
|
|
177
|
+
"unicorn/empty-brace-spaces": "error",
|
|
178
|
+
"unicorn/error-message": "off",
|
|
179
|
+
"unicorn/escape-case": "error",
|
|
180
|
+
"unicorn/explicit-length-check": "error",
|
|
181
|
+
"unicorn/filename-case": "off",
|
|
182
|
+
"unicorn/new-for-builtins": "error",
|
|
183
|
+
"unicorn/no-abusive-eslint-disable": "error",
|
|
184
|
+
"unicorn/no-anonymous-default-export": "off",
|
|
185
|
+
"unicorn/no-array-for-each": "off",
|
|
186
|
+
"unicorn/no-array-reduce": "off",
|
|
187
|
+
"unicorn/no-await-expression-member": "off",
|
|
188
|
+
"unicorn/no-await-in-promise-methods": "off",
|
|
189
|
+
"unicorn/prefer-set-has": "off",
|
|
190
|
+
"unicorn/no-console-spaces": "error",
|
|
191
|
+
"unicorn/no-document-cookie": "off",
|
|
192
|
+
"unicorn/no-empty-file": "error",
|
|
193
|
+
"unicorn/no-hex-escape": "error",
|
|
194
|
+
"unicorn/no-instanceof-array": "error",
|
|
195
|
+
"unicorn/no-invalid-remove-event-listener": "off",
|
|
196
|
+
"unicorn/no-lonely-if": "error",
|
|
197
|
+
"unicorn/no-magic-array-flat-depth": "off",
|
|
198
|
+
"unicorn/no-negated-condition": "off",
|
|
199
|
+
"unicorn/no-nested-ternary": "error",
|
|
200
|
+
"unicorn/no-new-array": "off",
|
|
201
|
+
"unicorn/no-new-buffer": "error",
|
|
202
|
+
"unicorn/no-null": "off",
|
|
203
|
+
"unicorn/no-object-as-default-parameter": "off",
|
|
204
|
+
"unicorn/no-process-exit": "off",
|
|
205
|
+
"unicorn/no-single-promise-in-promise-methods": "off",
|
|
206
|
+
"unicorn/no-static-only-class": "error",
|
|
207
|
+
"unicorn/no-thenable": "error",
|
|
208
|
+
"unicorn/no-this-assignment": "error",
|
|
209
|
+
"unicorn/no-typeof-undefined": "error",
|
|
210
|
+
"unicorn/no-unnecessary-await": "error",
|
|
211
|
+
"unicorn/no-unreadable-array-destructuring": "error",
|
|
212
|
+
"unicorn/no-unreadable-iife": "error",
|
|
213
|
+
"unicorn/no-useless-fallback-in-spread": "error",
|
|
214
|
+
"unicorn/no-useless-length-check": "error",
|
|
215
|
+
"unicorn/no-useless-promise-resolve-reject": "off",
|
|
216
|
+
"unicorn/no-useless-spread": "error",
|
|
217
|
+
"unicorn/no-useless-switch-case": "error",
|
|
218
|
+
"unicorn/no-useless-undefined": "off",
|
|
219
|
+
"unicorn/no-zero-fractions": "off",
|
|
220
|
+
"unicorn/number-literal-case": "off",
|
|
221
|
+
"unicorn/numeric-separators-style": "off",
|
|
222
|
+
"unicorn/prefer-add-event-listener": "off",
|
|
223
|
+
"unicorn/prefer-array-flat": "error",
|
|
224
|
+
"unicorn/prefer-array-flat-map": "error",
|
|
225
|
+
"unicorn/prefer-array-some": "off",
|
|
226
|
+
"unicorn/prefer-blob-reading-methods": "off",
|
|
227
|
+
"unicorn/prefer-code-point": "off",
|
|
228
|
+
"unicorn/prefer-date-now": "error",
|
|
229
|
+
"unicorn/prefer-dom-node-append": "off",
|
|
230
|
+
"unicorn/prefer-dom-node-dataset": "error",
|
|
231
|
+
"unicorn/prefer-dom-node-remove": "off",
|
|
232
|
+
"unicorn/prefer-dom-node-text-content": "error",
|
|
233
|
+
"unicorn/prefer-event-target": "error",
|
|
234
|
+
"unicorn/prefer-includes": "error",
|
|
235
|
+
"unicorn/prefer-logical-operator-over-ternary": "off",
|
|
236
|
+
"unicorn/prefer-math-trunc": "error",
|
|
237
|
+
"unicorn/prefer-modern-dom-apis": "error",
|
|
238
|
+
"unicorn/prefer-modern-math-apis": "error",
|
|
239
|
+
"unicorn/prefer-native-coercion-functions": "error",
|
|
240
|
+
"unicorn/prefer-node-protocol": "off",
|
|
241
|
+
"unicorn/prefer-number-properties": "error",
|
|
242
|
+
"unicorn/prefer-optional-catch-binding": "error",
|
|
243
|
+
"unicorn/prefer-prototype-methods": "error",
|
|
244
|
+
"unicorn/prefer-query-selector": "off",
|
|
245
|
+
"unicorn/prefer-reflect-apply": "error",
|
|
246
|
+
"unicorn/prefer-regexp-test": "error",
|
|
247
|
+
"unicorn/prefer-set-size": "error",
|
|
248
|
+
"unicorn/prefer-spread": "error",
|
|
249
|
+
"unicorn/prefer-string-replace-all": "off",
|
|
250
|
+
"unicorn/prefer-string-slice": "off",
|
|
251
|
+
"unicorn/prefer-string-starts-ends-with": "error",
|
|
252
|
+
"unicorn/prefer-string-trim-start-end": "error",
|
|
253
|
+
"unicorn/prefer-type-error": "error",
|
|
254
|
+
"unicorn/require-array-join-separator": "error",
|
|
255
|
+
"unicorn/require-number-to-fixed-digits-argument": "error",
|
|
256
|
+
"unicorn/switch-case-braces": "error",
|
|
257
|
+
"unicorn/text-encoding-identifier-case": "error",
|
|
258
|
+
"unicorn/throw-new-error": "error",
|
|
259
|
+
"unicorn/prefer-top-level-await": "off",
|
|
260
|
+
"unicorn/no-array-sort": "off",
|
|
261
|
+
"capitalized-comments": "off"
|
|
262
|
+
}
|
|
263
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../node_modules/oxlint/configuration_schema.json",
|
|
3
|
+
"plugins": ["react","jsx-a11y"],
|
|
4
|
+
"extends": ["./index.json"],
|
|
5
|
+
"rules": {
|
|
6
|
+
"react-perf/jsx-no-jsx-as-prop": "off",
|
|
7
|
+
"react-perf/jsx-no-new-array-as-prop": "off",
|
|
8
|
+
"react-perf/jsx-no-new-function-as-prop": "off",
|
|
9
|
+
"react-perf/jsx-no-new-object-as-prop": "off",
|
|
10
|
+
"react_perf/jsx-no-jsx-as-prop": "error",
|
|
11
|
+
"react_perf/jsx-no-new-array-as-prop": "error",
|
|
12
|
+
"react_perf/jsx-no-new-function-as-props": "error",
|
|
13
|
+
"react_perf/jsx-no-new-object-as-prop": "error",
|
|
14
|
+
"react/button-has-type": "error",
|
|
15
|
+
"react/exhaustive-deps": "error",
|
|
16
|
+
"react/jsx-filename-extension": [
|
|
17
|
+
"error",
|
|
18
|
+
{
|
|
19
|
+
"extensions": [".jsx", ".tsx"]
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"react/iframe-missing-sandbox": "error",
|
|
23
|
+
"react/jsx-key": "error",
|
|
24
|
+
"react/jsx-handler-names": "off",
|
|
25
|
+
"react/jsx-no-comment-text-nodes": "error",
|
|
26
|
+
"react/jsx-no-duplicate-props": "error",
|
|
27
|
+
"react/jsx-no-target-blank": "off",
|
|
28
|
+
"react/jsx-no-undef": "error",
|
|
29
|
+
"react/jsx-no-useless-fragment": "error",
|
|
30
|
+
"react/no-children-prop": "error",
|
|
31
|
+
"react/no-dangerously-set-inner-html": "error",
|
|
32
|
+
"react/no-direct-mutation-state": "error",
|
|
33
|
+
"react/no-find-dom-node": "error",
|
|
34
|
+
"react/no-is-mounted": "error",
|
|
35
|
+
"react/no-render-return-value": "error",
|
|
36
|
+
"react/no-set-state": "off",
|
|
37
|
+
"react/no-string-refs": "error",
|
|
38
|
+
"react/no-unescaped-entities": "error",
|
|
39
|
+
"react/no-unknown-property": "error",
|
|
40
|
+
"react/react-in-jsx-scope": "off",
|
|
41
|
+
"react/require-render-return": "error",
|
|
42
|
+
},
|
|
43
|
+
"settings": {
|
|
44
|
+
"jsx-a11y": {
|
|
45
|
+
"components": {
|
|
46
|
+
"polymorphicPropName": "as"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"react": {}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../node_modules/oxlint/configuration_schema.json",
|
|
3
|
+
"plugins": ["typescript"],
|
|
4
|
+
"extends": ["./index.json"],
|
|
5
|
+
"rules": {
|
|
6
|
+
"typescript/adjacent-overload-signatures": "error",
|
|
7
|
+
"typescript/array-type": "error",
|
|
8
|
+
"typescript/ban-ts-comment": "error",
|
|
9
|
+
"typescript/ban-tslint-comment": "off",
|
|
10
|
+
"typescript/ban-types": "error",
|
|
11
|
+
"typescript/consistent-indexed-object-style": "off",
|
|
12
|
+
"typescript/consistent-type-definitions": ["error", "type"],
|
|
13
|
+
"typescript/consistent-type-exports": "error",
|
|
14
|
+
"typescript/explicit-function-return-type": "off",
|
|
15
|
+
"typescript/explicit-module-boundary-types": "off",
|
|
16
|
+
"typescript/no-duplicate-enum-values": "error",
|
|
17
|
+
"typescript/no-empty-interface": "error",
|
|
18
|
+
"typescript/no-explicit-any": "error",
|
|
19
|
+
"typescript/no-extra-non-null-assertion": "error",
|
|
20
|
+
"typescript/no-magic-numbers": "off",
|
|
21
|
+
"typescript/no-misused-new": "error",
|
|
22
|
+
"typescript/no-namespace": "error",
|
|
23
|
+
"typescript/no-non-null-asserted-optional-chain": "error",
|
|
24
|
+
"typescript/no-non-null-assertion": "off",
|
|
25
|
+
"typescript/no-this-alias": "error",
|
|
26
|
+
"typescript/no-unnecessary-type-constraint": "error",
|
|
27
|
+
"typescript/no-unsafe-declaration-merging": "error",
|
|
28
|
+
"typescript/no-unsafe-member-access": "error",
|
|
29
|
+
"typescript/no-var-requires": "error",
|
|
30
|
+
"typescript/prefer-as-const": "error",
|
|
31
|
+
"typescript/prefer-enum-initializers": "off",
|
|
32
|
+
"typescript/prefer-for-of": "error",
|
|
33
|
+
"typescript/prefer-function-type": "off",
|
|
34
|
+
"typescript/prefer-literal-enum-member": "off",
|
|
35
|
+
"typescript/prefer-ts-expect-error": "off",
|
|
36
|
+
"typescript/triple-slash-reference": "error"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
{
|
|
3
|
+
"$schema": "../node_modules/oxlint/configuration_schema.json",
|
|
4
|
+
"plugins": [],
|
|
5
|
+
"extends": ["./index.json"],
|
|
6
|
+
"overrides": [{
|
|
7
|
+
"files": [
|
|
8
|
+
"**/__tests__/**/*.{ts,tsx}",
|
|
9
|
+
"**/__mocks__/**/*.{ts,tsx}",
|
|
10
|
+
"**/*.test.{ts,tsx}",
|
|
11
|
+
"**/*.spec.{ts,tsx}"
|
|
12
|
+
],
|
|
13
|
+
"plugins": ["import", "oxc", "vitest"],
|
|
14
|
+
"rules": {
|
|
15
|
+
"@typescript-eslint/consistent-type-imports": "off",
|
|
16
|
+
"import/no-namespace": "off",
|
|
17
|
+
"import/export": "off",
|
|
18
|
+
"import/no-anonymous-default-export": "off",
|
|
19
|
+
"import/no-unassigned-import": "off",
|
|
20
|
+
"jsx_a11y/label-has-associated-control": "off",
|
|
21
|
+
"vitest/prefer-lowercase-title": "error",
|
|
22
|
+
"node/no-process-env": "off",
|
|
23
|
+
"react/only-export-components": "off",
|
|
24
|
+
"unicorn/no-array-callback-reference": "off",
|
|
25
|
+
"react/jsx-props-no-spreading": "off",
|
|
26
|
+
"eslint/no-alert": "off",
|
|
27
|
+
"eslint/no-console": "off",
|
|
28
|
+
"import/no-named-export": "off",
|
|
29
|
+
"react/jsx-pascal-case": "off",
|
|
30
|
+
}
|
|
31
|
+
}],
|
|
32
|
+
|
|
33
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@scaleway/oxlint-config",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Scaleway's shareable configuration for oxlint",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"oxlint",
|
|
7
|
+
"oxlint-config",
|
|
8
|
+
"lint",
|
|
9
|
+
"config",
|
|
10
|
+
"scaleway"
|
|
11
|
+
],
|
|
12
|
+
"author": "Scaleway",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/scaleway/scaleway-lib",
|
|
17
|
+
"directory": "packages/oxlint-config"
|
|
18
|
+
},
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/scaleway/oxlint-config-scaleway/issues"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/scaleway/oxlint-config-scaleway#readme",
|
|
23
|
+
"main": "index.json",
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"configs/**"
|
|
29
|
+
],
|
|
30
|
+
"exports": {
|
|
31
|
+
".": "./configs/index.json",
|
|
32
|
+
"./react": "./configs/react.json",
|
|
33
|
+
"./typescript": "./configs/typescript.json",
|
|
34
|
+
"./vitest": "./configs/vitest.json"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"oxlint": "1.35.0"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"oxlint": "1.35.0"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
44
|
+
}
|
|
45
|
+
}
|