@robot-inventor/oxlint-config 0.0.0 → 0.1.1

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 CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 roboin
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.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 roboin
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,49 @@
1
+ # oxlint-config
2
+
3
+ [@Robot-Inventor](https://github.com/Robot-Inventor/)'s OXLint config presets.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install --save-dev @robot-inventor/oxlint-config
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ Create an `oxlint.config.ts` file and export one of the six presets:
14
+
15
+ ```ts
16
+ import { oxlintConfig } from "@robot-inventor/oxlint-config";
17
+
18
+ export default oxlintConfig;
19
+ ```
20
+
21
+ The available presets are:
22
+
23
+ - `oxlintConfig`
24
+ - `oxlintConfigNoJSDoc`
25
+ - `oxlintReactConfig`
26
+ - `oxlintReactConfigNoJSDoc`
27
+ - `oxlintNextConfig`
28
+ - `oxlintNextConfigNoJSDoc`
29
+
30
+ The `NoJSDoc` presets check existing JSDoc comments but do not require JSDoc on every declaration.
31
+
32
+ ## Overriding rules
33
+
34
+ OXLint only inherits `rules`, `plugins`, and `overrides` through its `extends` property. Use object spread so
35
+ that type-aware linting, settings, and JavaScript plugin registrations are retained:
36
+
37
+ ```ts
38
+ import { oxlintNextConfigNoJSDoc } from "@robot-inventor/oxlint-config";
39
+ import { defineConfig } from "oxlint";
40
+
41
+ export default defineConfig({
42
+ ...oxlintNextConfigNoJSDoc,
43
+ rules: {
44
+ "no-console": "off"
45
+ }
46
+ });
47
+ ```
48
+
49
+ Do not use a preset only through `extends: [preset]`; root-level options and settings would not be inherited.
@@ -0,0 +1,377 @@
1
+ declare const baseRules: {
2
+ readonly "accessor-pairs": "error";
3
+ readonly "array-callback-return": "error";
4
+ readonly "arrow-body-style": "error";
5
+ readonly "block-scoped-var": "error";
6
+ readonly "capitalized-comments": "error";
7
+ readonly "class-methods-use-this": "error";
8
+ readonly complexity: "error";
9
+ readonly "constructor-super": "error";
10
+ readonly curly: ["error", "multi-line"];
11
+ readonly "default-case": "error";
12
+ readonly "default-case-last": "error";
13
+ readonly "default-param-last": "error";
14
+ readonly eqeqeq: "error";
15
+ readonly "for-direction": "error";
16
+ readonly "func-name-matching": "error";
17
+ readonly "func-names": "error";
18
+ readonly "func-style": "error";
19
+ readonly "getter-return": "error";
20
+ readonly "grouped-accessor-pairs": "error";
21
+ readonly "guard-for-in": "error";
22
+ readonly "id-denylist": "error";
23
+ readonly "id-length": ["error", {
24
+ readonly exceptions: ["T", "K", "i", "j", "x", "y", "z"];
25
+ }];
26
+ readonly "id-match": "error";
27
+ readonly "init-declarations": "error";
28
+ readonly "logical-assignment-operators": "error";
29
+ readonly "max-classes-per-file": "error";
30
+ readonly "max-depth": "error";
31
+ readonly "max-lines": "error";
32
+ readonly "max-lines-per-function": "error";
33
+ readonly "max-nested-callbacks": "error";
34
+ readonly "max-params": "error";
35
+ readonly "max-statements": "error";
36
+ readonly "new-cap": "error";
37
+ readonly "no-alert": "error";
38
+ readonly "no-array-constructor": "error";
39
+ readonly "no-async-promise-executor": "error";
40
+ readonly "no-await-in-loop": "error";
41
+ readonly "no-bitwise": "error";
42
+ readonly "no-caller": "error";
43
+ readonly "no-case-declarations": "error";
44
+ readonly "no-class-assign": "error";
45
+ readonly "no-compare-neg-zero": "error";
46
+ readonly "no-cond-assign": "error";
47
+ readonly "no-console": "error";
48
+ readonly "no-const-assign": "error";
49
+ readonly "no-constant-binary-expression": "error";
50
+ readonly "no-constant-condition": "error";
51
+ readonly "no-constructor-return": "error";
52
+ readonly "no-continue": "error";
53
+ readonly "no-control-regex": "error";
54
+ readonly "no-debugger": "error";
55
+ readonly "no-delete-var": "error";
56
+ readonly "no-div-regex": "error";
57
+ readonly "no-dupe-class-members": "error";
58
+ readonly "no-dupe-else-if": "error";
59
+ readonly "no-dupe-keys": "error";
60
+ readonly "no-duplicate-case": "error";
61
+ readonly "no-duplicate-imports": "error";
62
+ readonly "no-else-return": "error";
63
+ readonly "no-empty": "error";
64
+ readonly "no-empty-character-class": "error";
65
+ readonly "no-empty-function": "error";
66
+ readonly "no-empty-pattern": "error";
67
+ readonly "no-empty-static-block": "error";
68
+ readonly "no-eq-null": "error";
69
+ readonly "no-eval": "error";
70
+ readonly "no-ex-assign": "error";
71
+ readonly "no-extend-native": "error";
72
+ readonly "no-extra-bind": "error";
73
+ readonly "no-extra-boolean-cast": "error";
74
+ readonly "no-extra-label": "error";
75
+ readonly "no-fallthrough": "error";
76
+ readonly "no-func-assign": "error";
77
+ readonly "no-global-assign": "error";
78
+ readonly "no-implicit-coercion": "error";
79
+ readonly "no-implicit-globals": "error";
80
+ readonly "no-import-assign": "error";
81
+ readonly "no-inline-comments": "error";
82
+ readonly "no-inner-declarations": "error";
83
+ readonly "no-invalid-regexp": "error";
84
+ readonly "no-irregular-whitespace": "error";
85
+ readonly "no-iterator": "error";
86
+ readonly "no-label-var": "error";
87
+ readonly "no-labels": "error";
88
+ readonly "no-lone-blocks": "error";
89
+ readonly "no-lonely-if": "error";
90
+ readonly "no-loop-func": "error";
91
+ readonly "no-loss-of-precision": "error";
92
+ readonly "no-magic-numbers": ["error", {
93
+ readonly ignoreArrayIndexes: true;
94
+ }];
95
+ readonly "no-misleading-character-class": "error";
96
+ readonly "no-multi-assign": "error";
97
+ readonly "no-multi-str": "error";
98
+ readonly "no-negated-condition": "error";
99
+ readonly "no-nested-ternary": "error";
100
+ readonly "no-new-func": "error";
101
+ readonly "no-new-native-nonconstructor": "error";
102
+ readonly "no-new-wrappers": "error";
103
+ readonly "no-nonoctal-decimal-escape": "error";
104
+ readonly "no-obj-calls": "error";
105
+ readonly "no-object-constructor": "error";
106
+ readonly "no-param-reassign": "error";
107
+ readonly "no-promise-executor-return": "error";
108
+ readonly "no-proto": "error";
109
+ readonly "no-prototype-builtins": "error";
110
+ readonly "no-redeclare": "error";
111
+ readonly "no-regex-spaces": "error";
112
+ readonly "no-restricted-exports": "error";
113
+ readonly "no-restricted-globals": "error";
114
+ readonly "no-restricted-imports": "error";
115
+ readonly "no-restricted-properties": "error";
116
+ readonly "no-return-assign": "error";
117
+ readonly "no-script-url": "error";
118
+ readonly "no-self-assign": "error";
119
+ readonly "no-self-compare": "error";
120
+ readonly "no-sequences": "error";
121
+ readonly "no-setter-return": "error";
122
+ readonly "no-shadow": "error";
123
+ readonly "no-shadow-restricted-names": "error";
124
+ readonly "no-sparse-arrays": "error";
125
+ readonly "no-template-curly-in-string": "error";
126
+ readonly "no-this-before-super": "error";
127
+ readonly "no-unassigned-vars": "error";
128
+ readonly "no-undef": "error";
129
+ readonly "no-undefined": "error";
130
+ readonly "no-underscore-dangle": "error";
131
+ readonly "no-unmodified-loop-condition": "error";
132
+ readonly "no-unneeded-ternary": "error";
133
+ readonly "no-unreachable": "error";
134
+ readonly "no-unreachable-loop": "error";
135
+ readonly "no-unsafe-finally": "error";
136
+ readonly "no-unsafe-negation": "error";
137
+ readonly "no-unsafe-optional-chaining": "error";
138
+ readonly "no-unused-expressions": "error";
139
+ readonly "no-unused-labels": "error";
140
+ readonly "no-unused-private-class-members": "error";
141
+ readonly "no-unused-vars": "error";
142
+ readonly "no-use-before-define": "error";
143
+ readonly "no-useless-assignment": "error";
144
+ readonly "no-useless-backreference": "error";
145
+ readonly "no-useless-call": "error";
146
+ readonly "no-useless-catch": "error";
147
+ readonly "no-useless-computed-key": "error";
148
+ readonly "no-useless-concat": "error";
149
+ readonly "no-useless-constructor": "error";
150
+ readonly "no-useless-escape": "error";
151
+ readonly "no-useless-rename": "error";
152
+ readonly "no-useless-return": "error";
153
+ readonly "no-var": "error";
154
+ readonly "no-void": ["error", {
155
+ readonly allowAsStatement: true;
156
+ }];
157
+ readonly "no-warning-comments": "error";
158
+ readonly "no-with": "error";
159
+ readonly "object-shorthand": "error";
160
+ readonly "one-var": ["error", "never"];
161
+ readonly "operator-assignment": "error";
162
+ readonly "prefer-arrow-callback": "error";
163
+ readonly "prefer-const": "error";
164
+ readonly "prefer-destructuring": "error";
165
+ readonly "prefer-exponentiation-operator": "error";
166
+ readonly "prefer-named-capture-group": "error";
167
+ readonly "prefer-numeric-literals": "error";
168
+ readonly "prefer-object-has-own": "error";
169
+ readonly "prefer-object-spread": "error";
170
+ readonly "prefer-regex-literals": "error";
171
+ readonly "prefer-rest-params": "error";
172
+ readonly "prefer-spread": "error";
173
+ readonly "prefer-template": "error";
174
+ readonly "preserve-caught-error": "error";
175
+ readonly radix: "error";
176
+ readonly "require-unicode-regexp": "error";
177
+ readonly "require-yield": "error";
178
+ readonly "sort-keys": "error";
179
+ readonly "sort-vars": "error";
180
+ readonly "symbol-description": "error";
181
+ readonly "unicode-bom": "error";
182
+ readonly "use-isnan": "error";
183
+ readonly "valid-typeof": "error";
184
+ readonly "vars-on-top": "error";
185
+ readonly yoda: "error";
186
+ readonly "jsdoc/check-access": "error";
187
+ readonly "jsdoc/check-property-names": "error";
188
+ readonly "jsdoc/check-tag-names": ["error", {
189
+ readonly typed: true;
190
+ }];
191
+ readonly "jsdoc/empty-tags": "error";
192
+ readonly "jsdoc/implements-on-classes": "error";
193
+ readonly "jsdoc/no-defaults": "error";
194
+ readonly "jsdoc/require-param": "error";
195
+ readonly "jsdoc/require-param-description": "error";
196
+ readonly "jsdoc/require-param-name": "error";
197
+ readonly "jsdoc/require-property": "error";
198
+ readonly "jsdoc/require-property-description": "error";
199
+ readonly "jsdoc/require-property-name": "error";
200
+ readonly "jsdoc/require-returns": "error";
201
+ readonly "jsdoc/require-returns-description": "error";
202
+ readonly "jsdoc/require-throws-type": "error";
203
+ readonly "jsdoc/require-yields": "error";
204
+ readonly "jsdoc/require-yields-type": "error";
205
+ readonly "import/namespace": "error";
206
+ readonly "import/default": "error";
207
+ readonly "import/export": "error";
208
+ readonly "import/no-named-as-default": "warn";
209
+ readonly "import/no-named-as-default-member": "warn";
210
+ readonly "import/no-duplicates": "warn";
211
+ readonly "import/no-absolute-path": "error";
212
+ readonly "import/no-cycle": "error";
213
+ readonly "import/no-self-import": "error";
214
+ readonly "import/exports-last": "error";
215
+ readonly "import/first": "error";
216
+ readonly "import/group-exports": "error";
217
+ readonly "import/max-dependencies": "error";
218
+ readonly "import/newline-after-import": "error";
219
+ readonly "import/no-unassigned-import": "error";
220
+ readonly "typescript/consistent-return": "error";
221
+ readonly "typescript/dot-notation": "error";
222
+ readonly "typescript/await-thenable": "error";
223
+ readonly "typescript/ban-ts-comment": ["error", {
224
+ readonly minimumDescriptionLength: 10;
225
+ }];
226
+ readonly "typescript/no-array-delete": "error";
227
+ readonly "typescript/no-base-to-string": "error";
228
+ readonly "typescript/no-confusing-void-expression": "error";
229
+ readonly "typescript/no-deprecated": "error";
230
+ readonly "typescript/no-duplicate-enum-values": "error";
231
+ readonly "typescript/no-duplicate-type-constituents": "error";
232
+ readonly "typescript/no-dynamic-delete": "error";
233
+ readonly "typescript/no-empty-object-type": "error";
234
+ readonly "typescript/no-explicit-any": "error";
235
+ readonly "typescript/no-extra-non-null-assertion": "error";
236
+ readonly "typescript/no-extraneous-class": "error";
237
+ readonly "typescript/no-floating-promises": "error";
238
+ readonly "typescript/no-for-in-array": "error";
239
+ readonly "typescript/no-implied-eval": "error";
240
+ readonly "typescript/no-invalid-void-type": "error";
241
+ readonly "typescript/no-meaningless-void-operator": "error";
242
+ readonly "typescript/no-misused-new": "error";
243
+ readonly "typescript/no-misused-promises": "error";
244
+ readonly "typescript/no-misused-spread": "error";
245
+ readonly "typescript/no-mixed-enums": "error";
246
+ readonly "typescript/no-namespace": "error";
247
+ readonly "typescript/no-non-null-asserted-nullish-coalescing": "error";
248
+ readonly "typescript/no-non-null-asserted-optional-chain": "error";
249
+ readonly "typescript/no-non-null-assertion": "error";
250
+ readonly "typescript/no-redundant-type-constituents": "error";
251
+ readonly "typescript/no-require-imports": "error";
252
+ readonly "typescript/no-unnecessary-boolean-literal-compare": "error";
253
+ readonly "typescript/no-unnecessary-condition": "error";
254
+ readonly "typescript/no-unnecessary-template-expression": "error";
255
+ readonly "typescript/no-unnecessary-type-arguments": "error";
256
+ readonly "typescript/no-unnecessary-type-assertion": "error";
257
+ readonly "typescript/no-unnecessary-type-constraint": "error";
258
+ readonly "typescript/no-unnecessary-type-conversion": "error";
259
+ readonly "typescript/no-unnecessary-type-parameters": "error";
260
+ readonly "typescript/no-unsafe-argument": "error";
261
+ readonly "typescript/no-unsafe-assignment": "error";
262
+ readonly "typescript/no-unsafe-call": "error";
263
+ readonly "typescript/no-unsafe-declaration-merging": "error";
264
+ readonly "typescript/no-unsafe-enum-comparison": "error";
265
+ readonly "typescript/no-unsafe-function-type": "error";
266
+ readonly "typescript/no-unsafe-member-access": "error";
267
+ readonly "typescript/no-unsafe-return": "error";
268
+ readonly "typescript/no-unsafe-unary-minus": "error";
269
+ readonly "typescript/no-useless-default-assignment": "error";
270
+ readonly "typescript/no-wrapper-object-types": "error";
271
+ readonly "typescript/only-throw-error": "error";
272
+ readonly "typescript/prefer-as-const": "error";
273
+ readonly "typescript/prefer-literal-enum-member": "error";
274
+ readonly "typescript/prefer-namespace-keyword": "error";
275
+ readonly "typescript/prefer-promise-reject-errors": "error";
276
+ readonly "typescript/prefer-reduce-type-parameter": "error";
277
+ readonly "typescript/prefer-return-this-type": "error";
278
+ readonly "typescript/related-getter-setter-pairs": "error";
279
+ readonly "typescript/require-await": "error";
280
+ readonly "typescript/restrict-plus-operands": ["error", {
281
+ readonly allowAny: false;
282
+ readonly allowBoolean: false;
283
+ readonly allowNullish: false;
284
+ readonly allowNumberAndString: false;
285
+ readonly allowRegExp: false;
286
+ }];
287
+ readonly "typescript/restrict-template-expressions": ["error", {
288
+ readonly allowAny: false;
289
+ readonly allowBoolean: false;
290
+ readonly allowNever: false;
291
+ readonly allowNullish: false;
292
+ readonly allowNumber: false;
293
+ readonly allowRegExp: false;
294
+ }];
295
+ readonly "typescript/return-await": ["error", "error-handling-correctness-only"];
296
+ readonly "typescript/triple-slash-reference": "error";
297
+ readonly "typescript/unbound-method": "error";
298
+ readonly "typescript/unified-signatures": "error";
299
+ readonly "typescript/use-unknown-in-catch-callback-variable": "error";
300
+ readonly "typescript/adjacent-overload-signatures": "error";
301
+ readonly "typescript/array-type": ["error", {
302
+ readonly default: "array-simple";
303
+ }];
304
+ readonly "typescript/ban-tslint-comment": "error";
305
+ readonly "typescript/class-literal-property-style": "error";
306
+ readonly "typescript/consistent-generic-constructors": "error";
307
+ readonly "typescript/consistent-indexed-object-style": "error";
308
+ readonly "typescript/consistent-type-assertions": "error";
309
+ readonly "typescript/consistent-type-definitions": "error";
310
+ readonly "typescript/no-confusing-non-null-assertion": "error";
311
+ readonly "typescript/no-inferrable-types": "error";
312
+ readonly "typescript/non-nullable-type-assertion-style": "error";
313
+ readonly "typescript/prefer-find": "error";
314
+ readonly "typescript/prefer-for-of": "error";
315
+ readonly "typescript/prefer-function-type": "error";
316
+ readonly "typescript/prefer-includes": "error";
317
+ readonly "typescript/prefer-nullish-coalescing": "error";
318
+ readonly "typescript/prefer-optional-chain": "error";
319
+ readonly "typescript/prefer-regexp-exec": "error";
320
+ readonly "typescript/prefer-string-starts-ends-with": "error";
321
+ readonly "typescript/explicit-function-return-type": "error";
322
+ readonly "typescript/explicit-member-accessibility": "error";
323
+ readonly "typescript/consistent-type-imports": "error";
324
+ readonly "typescript/no-import-type-side-effects": "error";
325
+ readonly "typescript/consistent-type-exports": "error";
326
+ readonly "typescript/switch-exhaustiveness-check": "error";
327
+ readonly "import/named": "off";
328
+ readonly "jsdoc/no-blank-blocks": "off";
329
+ readonly "jsdoc/require-param-type": "off";
330
+ readonly "jsdoc/require-property-type": "off";
331
+ readonly "jsdoc/require-returns-type": "off";
332
+ readonly "jsdoc/require-throws-description": "off";
333
+ readonly "jsdoc/require-yields-description": "off";
334
+ readonly "no-implied-eval": "off";
335
+ readonly "no-new": "off";
336
+ readonly "no-plusplus": "off";
337
+ readonly "no-ternary": "off";
338
+ readonly "no-throw-literal": "off";
339
+ readonly "no-unexpected-multiline": "off";
340
+ readonly "prefer-promise-reject-errors": "off";
341
+ readonly "require-await": "off";
342
+ readonly "unicorn/empty-brace-spaces": "off";
343
+ readonly "unicorn/no-nested-ternary": "off";
344
+ readonly "unicorn/number-literal-case": "off";
345
+ readonly "oxc/no-this-in-exported-function": "error";
346
+ readonly "sort-imports": ["error", {
347
+ readonly allowSeparatedGroups: false;
348
+ readonly ignoreCase: false;
349
+ readonly ignoreDeclarationSort: false;
350
+ readonly ignoreMemberSort: false;
351
+ readonly memberSyntaxSortOrder: ["none", "all", "multiple", "single"];
352
+ }];
353
+ readonly "typescript/no-this-alias": ["error", {
354
+ readonly allowedNames: ["that"];
355
+ }];
356
+ readonly "unicorn/no-useless-undefined": "error";
357
+ };
358
+ declare const typescriptOverrides: {
359
+ readonly "constructor-super": "off";
360
+ readonly "getter-return": "off";
361
+ readonly "no-class-assign": "off";
362
+ readonly "no-const-assign": "off";
363
+ readonly "no-dupe-class-members": "off";
364
+ readonly "no-dupe-keys": "off";
365
+ readonly "no-func-assign": "off";
366
+ readonly "no-import-assign": "off";
367
+ readonly "no-new-native-nonconstructor": "off";
368
+ readonly "no-obj-calls": "off";
369
+ readonly "no-redeclare": "off";
370
+ readonly "no-setter-return": "off";
371
+ readonly "no-this-before-super": "off";
372
+ readonly "no-undef": "off";
373
+ readonly "no-unreachable": "off";
374
+ readonly "no-unsafe-negation": "off";
375
+ readonly "no-with": "off";
376
+ };
377
+ export { baseRules, typescriptOverrides };