oxlint 1.29.0 → 1.31.0
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/configuration_schema.json +81 -41
- package/dist/bindings.js +402 -0
- package/dist/chunk.js +19 -0
- package/dist/cli.js +9 -410
- package/dist/index.d.ts +1004 -647
- package/dist/index.js +326 -3
- package/dist/lint.js +15123 -0
- package/dist/plugins.js +4 -10110
- package/dist/ts_eslint.cjs +512 -0
- package/package.json +10 -10
- package/dist/generated/deserialize.js +0 -6985
|
@@ -21,14 +21,16 @@
|
|
|
21
21
|
{
|
|
22
22
|
"$ref": "#/definitions/OxlintEnv"
|
|
23
23
|
}
|
|
24
|
-
]
|
|
24
|
+
],
|
|
25
|
+
"markdownDescription": "Environments enable and disable collections of global variables."
|
|
25
26
|
},
|
|
26
27
|
"extends": {
|
|
27
28
|
"description": "Paths of configuration files that this configuration file extends (inherits from). The files\nare resolved relative to the location of the configuration file that contains the `extends`\nproperty. The configuration files are merged from the first to the last, with the last file\noverriding the previous ones.",
|
|
28
29
|
"type": "array",
|
|
29
30
|
"items": {
|
|
30
31
|
"type": "string"
|
|
31
|
-
}
|
|
32
|
+
},
|
|
33
|
+
"markdownDescription": "Paths of configuration files that this configuration file extends (inherits from). The files\nare resolved relative to the location of the configuration file that contains the `extends`\nproperty. The configuration files are merged from the first to the last, with the last file\noverriding the previous ones."
|
|
32
34
|
},
|
|
33
35
|
"globals": {
|
|
34
36
|
"description": "Enabled or disabled specific global variables.",
|
|
@@ -37,7 +39,8 @@
|
|
|
37
39
|
{
|
|
38
40
|
"$ref": "#/definitions/OxlintGlobals"
|
|
39
41
|
}
|
|
40
|
-
]
|
|
42
|
+
],
|
|
43
|
+
"markdownDescription": "Enabled or disabled specific global variables."
|
|
41
44
|
},
|
|
42
45
|
"ignorePatterns": {
|
|
43
46
|
"description": "Globs to ignore during linting. These are resolved from the configuration file path.",
|
|
@@ -45,7 +48,8 @@
|
|
|
45
48
|
"type": "array",
|
|
46
49
|
"items": {
|
|
47
50
|
"type": "string"
|
|
48
|
-
}
|
|
51
|
+
},
|
|
52
|
+
"markdownDescription": "Globs to ignore during linting. These are resolved from the configuration file path."
|
|
49
53
|
},
|
|
50
54
|
"jsPlugins": {
|
|
51
55
|
"description": "JS plugins.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present.",
|
|
@@ -56,7 +60,8 @@
|
|
|
56
60
|
"items": {
|
|
57
61
|
"type": "string"
|
|
58
62
|
},
|
|
59
|
-
"uniqueItems": true
|
|
63
|
+
"uniqueItems": true,
|
|
64
|
+
"markdownDescription": "JS plugins.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present."
|
|
60
65
|
},
|
|
61
66
|
"overrides": {
|
|
62
67
|
"description": "Add, remove, or otherwise reconfigure rules for specific files or groups of files.",
|
|
@@ -64,7 +69,8 @@
|
|
|
64
69
|
{
|
|
65
70
|
"$ref": "#/definitions/OxlintOverrides"
|
|
66
71
|
}
|
|
67
|
-
]
|
|
72
|
+
],
|
|
73
|
+
"markdownDescription": "Add, remove, or otherwise reconfigure rules for specific files or groups of files."
|
|
68
74
|
},
|
|
69
75
|
"plugins": {
|
|
70
76
|
"description": "Enabled built-in plugins for Oxlint.\nYou can view the list of available plugins on\n[the website](https://oxc.rs/docs/guide/usage/linter/plugins.html#supported-plugins).\n\nNOTE: Setting the `plugins` field will overwrite the base set of plugins.\nThe `plugins` array should reflect all of the plugins you want to use.",
|
|
@@ -76,7 +82,8 @@
|
|
|
76
82
|
{
|
|
77
83
|
"type": "null"
|
|
78
84
|
}
|
|
79
|
-
]
|
|
85
|
+
],
|
|
86
|
+
"markdownDescription": "Enabled built-in plugins for Oxlint.\nYou can view the list of available plugins on\n[the website](https://oxc.rs/docs/guide/usage/linter/plugins.html#supported-plugins).\n\nNOTE: Setting the `plugins` field will overwrite the base set of plugins.\nThe `plugins` array should reflect all of the plugins you want to use."
|
|
80
87
|
},
|
|
81
88
|
"rules": {
|
|
82
89
|
"description": "Example\n\n`.oxlintrc.json`\n\n```json\n{\n\"$schema\": \"./node_modules/oxlint/configuration_schema.json\",\n\"rules\": {\n\"eqeqeq\": \"warn\",\n\"import/no-cycle\": \"error\",\n\"prefer-const\": [\"error\", { \"ignoreReadBeforeAssign\": true }]\n}\n}\n```\n\nSee [Oxlint Rules](https://oxc.rs/docs/guide/usage/linter/rules.html) for the list of\nrules.",
|
|
@@ -85,7 +92,8 @@
|
|
|
85
92
|
{
|
|
86
93
|
"$ref": "#/definitions/OxlintRules"
|
|
87
94
|
}
|
|
88
|
-
]
|
|
95
|
+
],
|
|
96
|
+
"markdownDescription": "Example\n\n`.oxlintrc.json`\n\n```json\n{\n\"$schema\": \"./node_modules/oxlint/configuration_schema.json\",\n\"rules\": {\n\"eqeqeq\": \"warn\",\n\"import/no-cycle\": \"error\",\n\"prefer-const\": [\"error\", { \"ignoreReadBeforeAssign\": true }]\n}\n}\n```\n\nSee [Oxlint Rules](https://oxc.rs/docs/guide/usage/linter/rules.html) for the list of\nrules."
|
|
89
97
|
},
|
|
90
98
|
"settings": {
|
|
91
99
|
"default": {
|
|
@@ -136,14 +144,16 @@
|
|
|
136
144
|
"warn",
|
|
137
145
|
"error",
|
|
138
146
|
"deny"
|
|
139
|
-
]
|
|
147
|
+
],
|
|
148
|
+
"markdownDescription": "Oxlint rule.\n- \"allow\" or \"off\": Turn off the rule.\n- \"warn\": Turn the rule on as a warning (doesn't affect exit code).\n- \"error\" or \"deny\": Turn the rule on as an error (will exit with a failure code)."
|
|
140
149
|
},
|
|
141
150
|
{
|
|
142
151
|
"description": "Oxlint rule.\n \n- 0: Turn off the rule.\n- 1: Turn the rule on as a warning (doesn't affect exit code).\n- 2: Turn the rule on as an error (will exit with a failure code).",
|
|
143
152
|
"type": "integer",
|
|
144
153
|
"format": "uint32",
|
|
145
154
|
"maximum": 2.0,
|
|
146
|
-
"minimum": 0.0
|
|
155
|
+
"minimum": 0.0,
|
|
156
|
+
"markdownDescription": "Oxlint rule.\n \n- 0: Turn off the rule.\n- 1: Turn the rule on as a warning (doesn't affect exit code).\n- 2: Turn the rule on as an error (will exit with a failure code)."
|
|
147
157
|
}
|
|
148
158
|
]
|
|
149
159
|
},
|
|
@@ -203,14 +213,16 @@
|
|
|
203
213
|
"type": "object",
|
|
204
214
|
"additionalProperties": {
|
|
205
215
|
"$ref": "#/definitions/DummyRule"
|
|
206
|
-
}
|
|
216
|
+
},
|
|
217
|
+
"markdownDescription": "See [Oxlint Rules](https://oxc.rs/docs/guide/usage/linter/rules.html)"
|
|
207
218
|
},
|
|
208
219
|
"GlobSet": {
|
|
209
220
|
"description": "A set of glob patterns.",
|
|
210
221
|
"type": "array",
|
|
211
222
|
"items": {
|
|
212
223
|
"type": "string"
|
|
213
|
-
}
|
|
224
|
+
},
|
|
225
|
+
"markdownDescription": "A set of glob patterns."
|
|
214
226
|
},
|
|
215
227
|
"GlobalValue": {
|
|
216
228
|
"type": "string",
|
|
@@ -226,37 +238,44 @@
|
|
|
226
238
|
"augmentsExtendsReplacesDocs": {
|
|
227
239
|
"description": "Only for `require-(yields|returns|description|example|param|throws)` rule",
|
|
228
240
|
"default": false,
|
|
229
|
-
"type": "boolean"
|
|
241
|
+
"type": "boolean",
|
|
242
|
+
"markdownDescription": "Only for `require-(yields|returns|description|example|param|throws)` rule"
|
|
230
243
|
},
|
|
231
244
|
"exemptDestructuredRootsFromChecks": {
|
|
232
245
|
"description": "Only for `require-param-type` and `require-param-description` rule",
|
|
233
246
|
"default": false,
|
|
234
|
-
"type": "boolean"
|
|
247
|
+
"type": "boolean",
|
|
248
|
+
"markdownDescription": "Only for `require-param-type` and `require-param-description` rule"
|
|
235
249
|
},
|
|
236
250
|
"ignoreInternal": {
|
|
237
251
|
"description": "For all rules but NOT apply to `empty-tags` rule",
|
|
238
252
|
"default": false,
|
|
239
|
-
"type": "boolean"
|
|
253
|
+
"type": "boolean",
|
|
254
|
+
"markdownDescription": "For all rules but NOT apply to `empty-tags` rule"
|
|
240
255
|
},
|
|
241
256
|
"ignorePrivate": {
|
|
242
257
|
"description": "For all rules but NOT apply to `check-access` and `empty-tags` rule",
|
|
243
258
|
"default": false,
|
|
244
|
-
"type": "boolean"
|
|
259
|
+
"type": "boolean",
|
|
260
|
+
"markdownDescription": "For all rules but NOT apply to `check-access` and `empty-tags` rule"
|
|
245
261
|
},
|
|
246
262
|
"ignoreReplacesDocs": {
|
|
247
263
|
"description": "Only for `require-(yields|returns|description|example|param|throws)` rule",
|
|
248
264
|
"default": true,
|
|
249
|
-
"type": "boolean"
|
|
265
|
+
"type": "boolean",
|
|
266
|
+
"markdownDescription": "Only for `require-(yields|returns|description|example|param|throws)` rule"
|
|
250
267
|
},
|
|
251
268
|
"implementsReplacesDocs": {
|
|
252
269
|
"description": "Only for `require-(yields|returns|description|example|param|throws)` rule",
|
|
253
270
|
"default": false,
|
|
254
|
-
"type": "boolean"
|
|
271
|
+
"type": "boolean",
|
|
272
|
+
"markdownDescription": "Only for `require-(yields|returns|description|example|param|throws)` rule"
|
|
255
273
|
},
|
|
256
274
|
"overrideReplacesDocs": {
|
|
257
275
|
"description": "Only for `require-(yields|returns|description|example|param|throws)` rule",
|
|
258
276
|
"default": true,
|
|
259
|
-
"type": "boolean"
|
|
277
|
+
"type": "boolean",
|
|
278
|
+
"markdownDescription": "Only for `require-(yields|returns|description|example|param|throws)` rule"
|
|
260
279
|
},
|
|
261
280
|
"tagNamePreference": {
|
|
262
281
|
"default": {},
|
|
@@ -280,7 +299,8 @@
|
|
|
280
299
|
"items": {
|
|
281
300
|
"type": "string"
|
|
282
301
|
}
|
|
283
|
-
}
|
|
302
|
+
},
|
|
303
|
+
"markdownDescription": "Map of attribute names to their DOM equivalents.\nThis is useful for non-React frameworks that use different attribute names.\n\nExample:\n\n```json\n{\n\"settings\": {\n\"jsx-a11y\": {\n\"attributes\": {\n\"for\": [\"htmlFor\", \"for\"]\n}\n}\n}\n}\n```"
|
|
284
304
|
},
|
|
285
305
|
"components": {
|
|
286
306
|
"description": "To have your custom components be checked as DOM elements, you can\nprovide a mapping of your component names to the DOM element name.\n\nExample:\n\n```json\n{\n\"settings\": {\n\"jsx-a11y\": {\n\"components\": {\n\"Link\": \"a\",\n\"IconButton\": \"button\"\n}\n}\n}\n}\n```",
|
|
@@ -288,16 +308,19 @@
|
|
|
288
308
|
"type": "object",
|
|
289
309
|
"additionalProperties": {
|
|
290
310
|
"type": "string"
|
|
291
|
-
}
|
|
311
|
+
},
|
|
312
|
+
"markdownDescription": "To have your custom components be checked as DOM elements, you can\nprovide a mapping of your component names to the DOM element name.\n\nExample:\n\n```json\n{\n\"settings\": {\n\"jsx-a11y\": {\n\"components\": {\n\"Link\": \"a\",\n\"IconButton\": \"button\"\n}\n}\n}\n}\n```"
|
|
292
313
|
},
|
|
293
314
|
"polymorphicPropName": {
|
|
294
315
|
"description": "An optional setting that define the prop your code uses to create polymorphic components.\nThis setting will be used to determine the element type in rules that\nrequire semantic context.\n\nFor example, if you set the `polymorphicPropName` to `as`, then this element:\n\n```jsx\n<Box as=\"h3\">Hello</Box>\n```\n\nWill be treated as an `h3`. If not set, this component will be treated\nas a `Box`.",
|
|
295
316
|
"type": [
|
|
296
317
|
"string",
|
|
297
318
|
"null"
|
|
298
|
-
]
|
|
319
|
+
],
|
|
320
|
+
"markdownDescription": "An optional setting that define the prop your code uses to create polymorphic components.\nThis setting will be used to determine the element type in rules that\nrequire semantic context.\n\nFor example, if you set the `polymorphicPropName` to `as`, then this element:\n\n```jsx\n<Box as=\"h3\">Hello</Box>\n```\n\nWill be treated as an `h3`. If not set, this component will be treated\nas a `Box`."
|
|
299
321
|
}
|
|
300
|
-
}
|
|
322
|
+
},
|
|
323
|
+
"markdownDescription": "Configure JSX A11y plugin rules.\n\nSee\n[eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y#configurations)'s\nconfiguration for a full reference."
|
|
301
324
|
},
|
|
302
325
|
"LintPluginOptionsSchema": {
|
|
303
326
|
"type": "string",
|
|
@@ -341,9 +364,11 @@
|
|
|
341
364
|
{
|
|
342
365
|
"$ref": "#/definitions/OneOrMany_for_String"
|
|
343
366
|
}
|
|
344
|
-
]
|
|
367
|
+
],
|
|
368
|
+
"markdownDescription": "The root directory of the Next.js project.\n\nThis is particularly useful when you have a monorepo and your Next.js\nproject is in a subfolder.\n\nExample:\n\n```json\n{\n\"settings\": {\n\"next\": {\n\"rootDir\": \"apps/dashboard/\"\n}\n}\n}\n```"
|
|
345
369
|
}
|
|
346
|
-
}
|
|
370
|
+
},
|
|
371
|
+
"markdownDescription": "Configure Next.js plugin rules."
|
|
347
372
|
},
|
|
348
373
|
"OneOrMany_for_String": {
|
|
349
374
|
"anyOf": [
|
|
@@ -390,21 +415,24 @@
|
|
|
390
415
|
"$ref": "#/definitions/AllowWarnDeny"
|
|
391
416
|
}
|
|
392
417
|
},
|
|
393
|
-
"additionalProperties": false
|
|
418
|
+
"additionalProperties": false,
|
|
419
|
+
"markdownDescription": "Configure an entire category of rules all at once.\n\nRules enabled or disabled this way will be overwritten by individual rules in the `rules` field.\n\nExample\n```json\n{\n \"$schema\": \"./node_modules/oxlint/configuration_schema.json\",\n \"categories\": {\n \"correctness\": \"warn\"\n },\n \"rules\": {\n \"eslint/no-unused-vars\": \"error\"\n }\n}\n```"
|
|
394
420
|
},
|
|
395
421
|
"OxlintEnv": {
|
|
396
422
|
"description": "Predefine global variables.\n\nEnvironments specify what global variables are predefined.\nSee [ESLint's list of environments](https://eslint.org/docs/v8.x/use/configure/language-options#specifying-environments)\nfor what environments are available and what each one provides.",
|
|
397
423
|
"type": "object",
|
|
398
424
|
"additionalProperties": {
|
|
399
425
|
"type": "boolean"
|
|
400
|
-
}
|
|
426
|
+
},
|
|
427
|
+
"markdownDescription": "Predefine global variables.\n\nEnvironments specify what global variables are predefined.\nSee [ESLint's list of environments](https://eslint.org/docs/v8.x/use/configure/language-options#specifying-environments)\nfor what environments are available and what each one provides."
|
|
401
428
|
},
|
|
402
429
|
"OxlintGlobals": {
|
|
403
430
|
"description": "Add or remove global variables.\n\nFor each global variable, set the corresponding value equal to `\"writable\"`\nto allow the variable to be overwritten or `\"readonly\"` to disallow overwriting.\n\nGlobals can be disabled by setting their value to `\"off\"`. For example, in\nan environment where most Es2015 globals are available but `Promise` is unavailable,\nyou might use this config:\n\n```json\n\n{\n\"$schema\": \"./node_modules/oxlint/configuration_schema.json\",\n\"env\": {\n\"es6\": true\n},\n\"globals\": {\n\"Promise\": \"off\"\n}\n}\n\n```\n\nYou may also use `\"readable\"` or `false` to represent `\"readonly\"`, and\n`\"writeable\"` or `true` to represent `\"writable\"`.",
|
|
404
431
|
"type": "object",
|
|
405
432
|
"additionalProperties": {
|
|
406
433
|
"$ref": "#/definitions/GlobalValue"
|
|
407
|
-
}
|
|
434
|
+
},
|
|
435
|
+
"markdownDescription": "Add or remove global variables.\n\nFor each global variable, set the corresponding value equal to `\"writable\"`\nto allow the variable to be overwritten or `\"readonly\"` to disallow overwriting.\n\nGlobals can be disabled by setting their value to `\"off\"`. For example, in\nan environment where most Es2015 globals are available but `Promise` is unavailable,\nyou might use this config:\n\n```json\n\n{\n\"$schema\": \"./node_modules/oxlint/configuration_schema.json\",\n\"env\": {\n\"es6\": true\n},\n\"globals\": {\n\"Promise\": \"off\"\n}\n}\n\n```\n\nYou may also use `\"readable\"` or `false` to represent `\"readonly\"`, and\n`\"writeable\"` or `true` to represent `\"writable\"`."
|
|
408
436
|
},
|
|
409
437
|
"OxlintOverride": {
|
|
410
438
|
"type": "object",
|
|
@@ -421,7 +449,8 @@
|
|
|
421
449
|
{
|
|
422
450
|
"type": "null"
|
|
423
451
|
}
|
|
424
|
-
]
|
|
452
|
+
],
|
|
453
|
+
"markdownDescription": "Environments enable and disable collections of global variables."
|
|
425
454
|
},
|
|
426
455
|
"files": {
|
|
427
456
|
"description": "A list of glob patterns to override.\n\n## Example\n`[ \"*.test.ts\", \"*.spec.ts\" ]`",
|
|
@@ -429,7 +458,8 @@
|
|
|
429
458
|
{
|
|
430
459
|
"$ref": "#/definitions/GlobSet"
|
|
431
460
|
}
|
|
432
|
-
]
|
|
461
|
+
],
|
|
462
|
+
"markdownDescription": "A list of glob patterns to override.\n\n## Example\n`[ \"*.test.ts\", \"*.spec.ts\" ]`"
|
|
433
463
|
},
|
|
434
464
|
"globals": {
|
|
435
465
|
"description": "Enabled or disabled specific global variables.",
|
|
@@ -440,7 +470,8 @@
|
|
|
440
470
|
{
|
|
441
471
|
"type": "null"
|
|
442
472
|
}
|
|
443
|
-
]
|
|
473
|
+
],
|
|
474
|
+
"markdownDescription": "Enabled or disabled specific global variables."
|
|
444
475
|
},
|
|
445
476
|
"jsPlugins": {
|
|
446
477
|
"description": "JS plugins for this override.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present.",
|
|
@@ -451,7 +482,8 @@
|
|
|
451
482
|
"items": {
|
|
452
483
|
"type": "string"
|
|
453
484
|
},
|
|
454
|
-
"uniqueItems": true
|
|
485
|
+
"uniqueItems": true,
|
|
486
|
+
"markdownDescription": "JS plugins for this override.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present."
|
|
455
487
|
},
|
|
456
488
|
"plugins": {
|
|
457
489
|
"description": "Optionally change what plugins are enabled for this override. When\nomitted, the base config's plugins are used.",
|
|
@@ -463,7 +495,8 @@
|
|
|
463
495
|
{
|
|
464
496
|
"type": "null"
|
|
465
497
|
}
|
|
466
|
-
]
|
|
498
|
+
],
|
|
499
|
+
"markdownDescription": "Optionally change what plugins are enabled for this override. When\nomitted, the base config's plugins are used."
|
|
467
500
|
},
|
|
468
501
|
"rules": {
|
|
469
502
|
"default": {},
|
|
@@ -549,7 +582,8 @@
|
|
|
549
582
|
}
|
|
550
583
|
]
|
|
551
584
|
}
|
|
552
|
-
}
|
|
585
|
+
},
|
|
586
|
+
"markdownDescription": "Configure the behavior of linter plugins.\n\nHere's an example if you're using Next.js in a monorepo:\n\n```json\n{\n\"settings\": {\n\"next\": {\n\"rootDir\": \"apps/dashboard/\"\n},\n\"react\": {\n\"linkComponents\": [\n{ \"name\": \"Link\", \"linkAttribute\": \"to\" }\n]\n},\n\"jsx-a11y\": {\n\"components\": {\n\"Link\": \"a\",\n\"Button\": \"button\"\n}\n}\n}\n}\n```"
|
|
553
587
|
},
|
|
554
588
|
"ReactPluginSettings": {
|
|
555
589
|
"description": "Configure React plugin rules.\n\nDerived from [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react#configuration-legacy-eslintrc-)",
|
|
@@ -561,7 +595,8 @@
|
|
|
561
595
|
"type": "array",
|
|
562
596
|
"items": {
|
|
563
597
|
"$ref": "#/definitions/CustomComponent"
|
|
564
|
-
}
|
|
598
|
+
},
|
|
599
|
+
"markdownDescription": "Components used as alternatives to `<form>` for forms, such as `<Formik>`.\n\nExample:\n\n```jsonc\n{\n\"settings\": {\n\"react\": {\n\"formComponents\": [\n\"CustomForm\",\n// OtherForm is considered a form component and has an endpoint attribute\n{ \"name\": \"OtherForm\", \"formAttribute\": \"endpoint\" },\n// allows specifying multiple properties if necessary\n{ \"name\": \"Form\", \"formAttribute\": [\"registerEndpoint\", \"loginEndpoint\"] }\n]\n}\n}\n}\n```"
|
|
565
600
|
},
|
|
566
601
|
"linkComponents": {
|
|
567
602
|
"description": "Components used as alternatives to `<a>` for linking, such as `<Link>`.\n\nExample:\n\n```jsonc\n{\n\"settings\": {\n\"react\": {\n\"linkComponents\": [\n\"HyperLink\",\n// Use `linkAttribute` for components that use a different prop name\n// than `href`.\n{ \"name\": \"MyLink\", \"linkAttribute\": \"to\" },\n// allows specifying multiple properties if necessary\n{ \"name\": \"Link\", \"linkAttribute\": [\"to\", \"href\"] }\n]\n}\n}\n}\n```",
|
|
@@ -569,9 +604,11 @@
|
|
|
569
604
|
"type": "array",
|
|
570
605
|
"items": {
|
|
571
606
|
"$ref": "#/definitions/CustomComponent"
|
|
572
|
-
}
|
|
607
|
+
},
|
|
608
|
+
"markdownDescription": "Components used as alternatives to `<a>` for linking, such as `<Link>`.\n\nExample:\n\n```jsonc\n{\n\"settings\": {\n\"react\": {\n\"linkComponents\": [\n\"HyperLink\",\n// Use `linkAttribute` for components that use a different prop name\n// than `href`.\n{ \"name\": \"MyLink\", \"linkAttribute\": \"to\" },\n// allows specifying multiple properties if necessary\n{ \"name\": \"Link\", \"linkAttribute\": [\"to\", \"href\"] }\n]\n}\n}\n}\n```"
|
|
573
609
|
}
|
|
574
|
-
}
|
|
610
|
+
},
|
|
611
|
+
"markdownDescription": "Configure React plugin rules.\n\nDerived from [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react#configuration-legacy-eslintrc-)"
|
|
575
612
|
},
|
|
576
613
|
"TagNamePreference": {
|
|
577
614
|
"anyOf": [
|
|
@@ -616,9 +653,12 @@
|
|
|
616
653
|
"typecheck": {
|
|
617
654
|
"description": "Whether to enable typecheck mode for Vitest rules.\nWhen enabled, some rules will skip certain checks for describe blocks\nto accommodate TypeScript type checking scenarios.",
|
|
618
655
|
"default": false,
|
|
619
|
-
"type": "boolean"
|
|
656
|
+
"type": "boolean",
|
|
657
|
+
"markdownDescription": "Whether to enable typecheck mode for Vitest rules.\nWhen enabled, some rules will skip certain checks for describe blocks\nto accommodate TypeScript type checking scenarios."
|
|
620
658
|
}
|
|
621
|
-
}
|
|
659
|
+
},
|
|
660
|
+
"markdownDescription": "Configure Vitest plugin rules.\n\nSee [eslint-plugin-vitest](https://github.com/veritem/eslint-plugin-vitest)'s\nconfiguration for a full reference."
|
|
622
661
|
}
|
|
623
|
-
}
|
|
624
|
-
}
|
|
662
|
+
},
|
|
663
|
+
"markdownDescription": "Oxlint Configuration File\n\nThis configuration is aligned with ESLint v8's configuration schema (`eslintrc.json`).\n\nUsage: `oxlint -c oxlintrc.json --import-plugin`\n\n::: danger NOTE\n\nOnly the `.json` format is supported. You can use comments in configuration files.\n\n:::\n\nExample\n\n`.oxlintrc.json`\n\n```json\n{\n\"$schema\": \"./node_modules/oxlint/configuration_schema.json\",\n\"plugins\": [\"import\", \"typescript\", \"unicorn\"],\n\"env\": {\n\"browser\": true\n},\n\"globals\": {\n\"foo\": \"readonly\"\n},\n\"settings\": {\n},\n\"rules\": {\n\"eqeqeq\": \"warn\",\n\"import/no-cycle\": \"error\",\n\"react/self-closing-comp\": [\"error\", { \"html\": false }]\n},\n\"overrides\": [\n{\n\"files\": [\"*.test.ts\", \"*.spec.ts\"],\n\"rules\": {\n\"@typescript-eslint/no-explicit-any\": \"off\"\n}\n}\n]\n}\n```"
|
|
664
|
+
}
|