oxlint-react-compiler-experimental 0.0.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/README.md +59 -0
- package/bin/oxlint +3 -0
- package/configuration_schema.json +800 -0
- package/dist/bindings.js +404 -0
- package/dist/cli.js +84 -0
- package/dist/config.js +16 -0
- package/dist/index.d.ts +735 -0
- package/dist/index.js +2 -0
- package/dist/js_config.js +66 -0
- package/dist/lint.js +22559 -0
- package/dist/oxlint.darwin-arm64.node +0 -0
- package/dist/plugins-dev.d.ts +4203 -0
- package/dist/plugins-dev.js +866 -0
- package/dist/plugins.js +23 -0
- package/dist/utils.js +44 -0
- package/dist/workspace.js +2 -0
- package/dist/workspace2.js +35 -0
- package/package.json +66 -0
|
@@ -0,0 +1,800 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Oxlintrc",
|
|
4
|
+
"description": "Oxlint Configuration File\n\nThis configuration is aligned with ESLint v8's configuration schema (`eslintrc.json`).\n\nUsage: `oxlint -c oxlintrc.json`\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\"react\": {\n\"version\": \"18.2.0\"\n},\n\"custom\": { \"option\": true }\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```\n\n`oxlint.config.ts`\n\n```ts\nimport { defineConfig } from \"oxlint\";\n\nexport default defineConfig({\nplugins: [\"import\", \"typescript\", \"unicorn\"],\nenv: {\n\"browser\": true\n},\nglobals: {\n\"foo\": \"readonly\"\n},\nsettings: {\nreact: {\nversion: \"18.2.0\"\n},\ncustom: { option: true }\n},\nrules: {\n\"eqeqeq\": \"warn\",\n\"import/no-cycle\": \"error\",\n\"react/self-closing-comp\": [\"error\", { \"html\": false }]\n},\noverrides: [\n{\nfiles: [\"*.test.ts\", \"*.spec.ts\"],\nrules: {\n\"@typescript-eslint/no-explicit-any\": \"off\"\n}\n}\n]\n}\n});\n```",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"$schema": {
|
|
8
|
+
"description": "Schema URI for editor tooling.",
|
|
9
|
+
"type": [
|
|
10
|
+
"string",
|
|
11
|
+
"null"
|
|
12
|
+
],
|
|
13
|
+
"markdownDescription": "Schema URI for editor tooling."
|
|
14
|
+
},
|
|
15
|
+
"categories": {
|
|
16
|
+
"default": {},
|
|
17
|
+
"allOf": [
|
|
18
|
+
{
|
|
19
|
+
"$ref": "#/definitions/OxlintCategories"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"env": {
|
|
24
|
+
"description": "Environments enable and disable collections of global variables.",
|
|
25
|
+
"default": {
|
|
26
|
+
"builtin": true
|
|
27
|
+
},
|
|
28
|
+
"allOf": [
|
|
29
|
+
{
|
|
30
|
+
"$ref": "#/definitions/OxlintEnv"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"markdownDescription": "Environments enable and disable collections of global variables."
|
|
34
|
+
},
|
|
35
|
+
"extends": {
|
|
36
|
+
"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.",
|
|
37
|
+
"type": "array",
|
|
38
|
+
"items": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
"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."
|
|
42
|
+
},
|
|
43
|
+
"globals": {
|
|
44
|
+
"description": "Enabled or disabled specific global variables.",
|
|
45
|
+
"default": {},
|
|
46
|
+
"allOf": [
|
|
47
|
+
{
|
|
48
|
+
"$ref": "#/definitions/OxlintGlobals"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"markdownDescription": "Enabled or disabled specific global variables."
|
|
52
|
+
},
|
|
53
|
+
"ignorePatterns": {
|
|
54
|
+
"description": "Globs to ignore during linting. These are resolved from the configuration file path.",
|
|
55
|
+
"default": [],
|
|
56
|
+
"type": "array",
|
|
57
|
+
"items": {
|
|
58
|
+
"type": "string"
|
|
59
|
+
},
|
|
60
|
+
"markdownDescription": "Globs to ignore during linting. These are resolved from the configuration file path."
|
|
61
|
+
},
|
|
62
|
+
"jsPlugins": {
|
|
63
|
+
"description": "JS plugins, allows usage of ESLint plugins with Oxlint.\n\nRead more about JS plugins in\n[the docs](https://oxc.rs/docs/guide/usage/linter/js-plugins.html).\n\nNote: JS plugins are experimental and not subject to semver.\n\nExamples:\n\nBasic usage with a local plugin path.\n\n```json\n{\n\"jsPlugins\": [\"./custom-plugin.js\"],\n\"rules\": {\n\"custom/rule-name\": \"warn\"\n}\n}\n```\n\nUsing a built-in Rust plugin alongside a JS plugin with the same name\nby giving the JS plugin an alias.\n\n```json\n{\n\"plugins\": [\"import\"],\n\"jsPlugins\": [\n{ \"name\": \"import-js\", \"specifier\": \"eslint-plugin-import\" }\n],\n\"rules\": {\n\"import/no-cycle\": \"error\",\n\"import-js/no-unresolved\": \"warn\"\n}\n}\n```",
|
|
64
|
+
"anyOf": [
|
|
65
|
+
{
|
|
66
|
+
"type": "null"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": {
|
|
71
|
+
"$ref": "#/definitions/ExternalPluginEntry"
|
|
72
|
+
},
|
|
73
|
+
"uniqueItems": true
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"markdownDescription": "JS plugins, allows usage of ESLint plugins with Oxlint.\n\nRead more about JS plugins in\n[the docs](https://oxc.rs/docs/guide/usage/linter/js-plugins.html).\n\nNote: JS plugins are experimental and not subject to semver.\n\nExamples:\n\nBasic usage with a local plugin path.\n\n```json\n{\n\"jsPlugins\": [\"./custom-plugin.js\"],\n\"rules\": {\n\"custom/rule-name\": \"warn\"\n}\n}\n```\n\nUsing a built-in Rust plugin alongside a JS plugin with the same name\nby giving the JS plugin an alias.\n\n```json\n{\n\"plugins\": [\"import\"],\n\"jsPlugins\": [\n{ \"name\": \"import-js\", \"specifier\": \"eslint-plugin-import\" }\n],\n\"rules\": {\n\"import/no-cycle\": \"error\",\n\"import-js/no-unresolved\": \"warn\"\n}\n}\n```"
|
|
77
|
+
},
|
|
78
|
+
"options": {
|
|
79
|
+
"description": "Oxlint config options.",
|
|
80
|
+
"allOf": [
|
|
81
|
+
{
|
|
82
|
+
"$ref": "#/definitions/OxlintOptions"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"markdownDescription": "Oxlint config options."
|
|
86
|
+
},
|
|
87
|
+
"overrides": {
|
|
88
|
+
"description": "Add, remove, or otherwise reconfigure rules for specific files or groups of files.",
|
|
89
|
+
"allOf": [
|
|
90
|
+
{
|
|
91
|
+
"$ref": "#/definitions/OxlintOverrides"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"markdownDescription": "Add, remove, or otherwise reconfigure rules for specific files or groups of files."
|
|
95
|
+
},
|
|
96
|
+
"plugins": {
|
|
97
|
+
"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.",
|
|
98
|
+
"default": null,
|
|
99
|
+
"anyOf": [
|
|
100
|
+
{
|
|
101
|
+
"$ref": "#/definitions/LintPlugins"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"type": "null"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"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."
|
|
108
|
+
},
|
|
109
|
+
"rules": {
|
|
110
|
+
"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.",
|
|
111
|
+
"default": {},
|
|
112
|
+
"allOf": [
|
|
113
|
+
{
|
|
114
|
+
"$ref": "#/definitions/OxlintRules"
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"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."
|
|
118
|
+
},
|
|
119
|
+
"settings": {
|
|
120
|
+
"description": "Plugin-specific configuration for both built-in and custom plugins.\nThis includes settings for built-in plugins such as `react` and `jsdoc`\nas well as configuring settings for JS custom plugins loaded via `jsPlugins`.",
|
|
121
|
+
"default": {
|
|
122
|
+
"jsx-a11y": {
|
|
123
|
+
"polymorphicPropName": null,
|
|
124
|
+
"components": {},
|
|
125
|
+
"attributes": {}
|
|
126
|
+
},
|
|
127
|
+
"next": {
|
|
128
|
+
"rootDir": []
|
|
129
|
+
},
|
|
130
|
+
"react": {
|
|
131
|
+
"formComponents": [],
|
|
132
|
+
"linkComponents": [],
|
|
133
|
+
"version": null,
|
|
134
|
+
"componentWrapperFunctions": []
|
|
135
|
+
},
|
|
136
|
+
"jsdoc": {
|
|
137
|
+
"ignorePrivate": false,
|
|
138
|
+
"ignoreInternal": false,
|
|
139
|
+
"ignoreReplacesDocs": true,
|
|
140
|
+
"overrideReplacesDocs": true,
|
|
141
|
+
"augmentsExtendsReplacesDocs": false,
|
|
142
|
+
"implementsReplacesDocs": false,
|
|
143
|
+
"exemptDestructuredRootsFromChecks": false,
|
|
144
|
+
"tagNamePreference": {}
|
|
145
|
+
},
|
|
146
|
+
"vitest": {
|
|
147
|
+
"typecheck": false
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"allOf": [
|
|
151
|
+
{
|
|
152
|
+
"$ref": "#/definitions/OxlintSettings"
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
"markdownDescription": "Plugin-specific configuration for both built-in and custom plugins.\nThis includes settings for built-in plugins such as `react` and `jsdoc`\nas well as configuring settings for JS custom plugins loaded via `jsPlugins`."
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"additionalProperties": false,
|
|
159
|
+
"allowComments": true,
|
|
160
|
+
"allowTrailingCommas": true,
|
|
161
|
+
"definitions": {
|
|
162
|
+
"AllowWarnDeny": {
|
|
163
|
+
"oneOf": [
|
|
164
|
+
{
|
|
165
|
+
"description": "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).",
|
|
166
|
+
"type": "string",
|
|
167
|
+
"enum": [
|
|
168
|
+
"allow",
|
|
169
|
+
"off",
|
|
170
|
+
"warn",
|
|
171
|
+
"error",
|
|
172
|
+
"deny"
|
|
173
|
+
],
|
|
174
|
+
"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)."
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"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).",
|
|
178
|
+
"type": "integer",
|
|
179
|
+
"format": "uint32",
|
|
180
|
+
"maximum": 2.0,
|
|
181
|
+
"minimum": 0.0,
|
|
182
|
+
"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)."
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
"CustomComponent": {
|
|
187
|
+
"anyOf": [
|
|
188
|
+
{
|
|
189
|
+
"type": "string"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"type": "object",
|
|
193
|
+
"required": [
|
|
194
|
+
"attribute",
|
|
195
|
+
"name"
|
|
196
|
+
],
|
|
197
|
+
"properties": {
|
|
198
|
+
"attribute": {
|
|
199
|
+
"type": "string"
|
|
200
|
+
},
|
|
201
|
+
"name": {
|
|
202
|
+
"type": "string"
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"type": "object",
|
|
208
|
+
"required": [
|
|
209
|
+
"attributes",
|
|
210
|
+
"name"
|
|
211
|
+
],
|
|
212
|
+
"properties": {
|
|
213
|
+
"attributes": {
|
|
214
|
+
"type": "array",
|
|
215
|
+
"items": {
|
|
216
|
+
"type": "string"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"name": {
|
|
220
|
+
"type": "string"
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
"DummyRule": {
|
|
227
|
+
"anyOf": [
|
|
228
|
+
{
|
|
229
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"type": "array",
|
|
233
|
+
"items": true
|
|
234
|
+
}
|
|
235
|
+
]
|
|
236
|
+
},
|
|
237
|
+
"DummyRuleMap": {
|
|
238
|
+
"description": "See [Oxlint Rules](https://oxc.rs/docs/guide/usage/linter/rules.html)",
|
|
239
|
+
"type": "object",
|
|
240
|
+
"additionalProperties": {
|
|
241
|
+
"$ref": "#/definitions/DummyRule"
|
|
242
|
+
},
|
|
243
|
+
"markdownDescription": "See [Oxlint Rules](https://oxc.rs/docs/guide/usage/linter/rules.html)"
|
|
244
|
+
},
|
|
245
|
+
"ExternalPluginEntry": {
|
|
246
|
+
"anyOf": [
|
|
247
|
+
{
|
|
248
|
+
"description": "Path or package name of the plugin",
|
|
249
|
+
"type": "string",
|
|
250
|
+
"markdownDescription": "Path or package name of the plugin"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"description": "Plugin with custom name/alias",
|
|
254
|
+
"type": "object",
|
|
255
|
+
"required": [
|
|
256
|
+
"name",
|
|
257
|
+
"specifier"
|
|
258
|
+
],
|
|
259
|
+
"properties": {
|
|
260
|
+
"name": {
|
|
261
|
+
"description": "Custom name/alias for the plugin.\n\nNote: The following plugin names are reserved because they are implemented natively in Rust within oxlint and cannot be used for JS plugins:\n- react (includes react-hooks)\n- unicorn\n- typescript (includes @typescript-eslint)\n- oxc\n- import (includes import-x)\n- jsdoc\n- jest\n- vitest\n- jsx-a11y\n- nextjs\n- react-perf\n- promise\n- node\n- vue\n- eslint\n\nIf you need to use the JavaScript version of any of these plugins, provide a custom alias to avoid conflicts.",
|
|
262
|
+
"type": "string",
|
|
263
|
+
"markdownDescription": "Custom name/alias for the plugin.\n\nNote: The following plugin names are reserved because they are implemented natively in Rust within oxlint and cannot be used for JS plugins:\n- react (includes react-hooks)\n- unicorn\n- typescript (includes @typescript-eslint)\n- oxc\n- import (includes import-x)\n- jsdoc\n- jest\n- vitest\n- jsx-a11y\n- nextjs\n- react-perf\n- promise\n- node\n- vue\n- eslint\n\nIf you need to use the JavaScript version of any of these plugins, provide a custom alias to avoid conflicts."
|
|
264
|
+
},
|
|
265
|
+
"specifier": {
|
|
266
|
+
"description": "Path or package name of the plugin",
|
|
267
|
+
"type": "string",
|
|
268
|
+
"markdownDescription": "Path or package name of the plugin"
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"additionalProperties": false,
|
|
272
|
+
"markdownDescription": "Plugin with custom name/alias"
|
|
273
|
+
}
|
|
274
|
+
]
|
|
275
|
+
},
|
|
276
|
+
"GlobSet": {
|
|
277
|
+
"description": "A set of glob patterns.",
|
|
278
|
+
"type": "array",
|
|
279
|
+
"items": {
|
|
280
|
+
"type": "string"
|
|
281
|
+
},
|
|
282
|
+
"markdownDescription": "A set of glob patterns."
|
|
283
|
+
},
|
|
284
|
+
"GlobalValue": {
|
|
285
|
+
"type": "string",
|
|
286
|
+
"enum": [
|
|
287
|
+
"readonly",
|
|
288
|
+
"writable",
|
|
289
|
+
"off"
|
|
290
|
+
]
|
|
291
|
+
},
|
|
292
|
+
"JSDocPluginSettings": {
|
|
293
|
+
"type": "object",
|
|
294
|
+
"properties": {
|
|
295
|
+
"augmentsExtendsReplacesDocs": {
|
|
296
|
+
"description": "Only for `require-(yields|returns|description|example|param|throws)` rule",
|
|
297
|
+
"default": false,
|
|
298
|
+
"type": "boolean",
|
|
299
|
+
"markdownDescription": "Only for `require-(yields|returns|description|example|param|throws)` rule"
|
|
300
|
+
},
|
|
301
|
+
"exemptDestructuredRootsFromChecks": {
|
|
302
|
+
"description": "Only for `require-param-type` and `require-param-description` rule",
|
|
303
|
+
"default": false,
|
|
304
|
+
"type": "boolean",
|
|
305
|
+
"markdownDescription": "Only for `require-param-type` and `require-param-description` rule"
|
|
306
|
+
},
|
|
307
|
+
"ignoreInternal": {
|
|
308
|
+
"description": "For all rules but NOT apply to `empty-tags` rule",
|
|
309
|
+
"default": false,
|
|
310
|
+
"type": "boolean",
|
|
311
|
+
"markdownDescription": "For all rules but NOT apply to `empty-tags` rule"
|
|
312
|
+
},
|
|
313
|
+
"ignorePrivate": {
|
|
314
|
+
"description": "For all rules but NOT apply to `check-access` and `empty-tags` rule",
|
|
315
|
+
"default": false,
|
|
316
|
+
"type": "boolean",
|
|
317
|
+
"markdownDescription": "For all rules but NOT apply to `check-access` and `empty-tags` rule"
|
|
318
|
+
},
|
|
319
|
+
"ignoreReplacesDocs": {
|
|
320
|
+
"description": "Only for `require-(yields|returns|description|example|param|throws)` rule",
|
|
321
|
+
"default": true,
|
|
322
|
+
"type": "boolean",
|
|
323
|
+
"markdownDescription": "Only for `require-(yields|returns|description|example|param|throws)` rule"
|
|
324
|
+
},
|
|
325
|
+
"implementsReplacesDocs": {
|
|
326
|
+
"description": "Only for `require-(yields|returns|description|example|param|throws)` rule",
|
|
327
|
+
"default": false,
|
|
328
|
+
"type": "boolean",
|
|
329
|
+
"markdownDescription": "Only for `require-(yields|returns|description|example|param|throws)` rule"
|
|
330
|
+
},
|
|
331
|
+
"overrideReplacesDocs": {
|
|
332
|
+
"description": "Only for `require-(yields|returns|description|example|param|throws)` rule",
|
|
333
|
+
"default": true,
|
|
334
|
+
"type": "boolean",
|
|
335
|
+
"markdownDescription": "Only for `require-(yields|returns|description|example|param|throws)` rule"
|
|
336
|
+
},
|
|
337
|
+
"tagNamePreference": {
|
|
338
|
+
"default": {},
|
|
339
|
+
"type": "object",
|
|
340
|
+
"additionalProperties": {
|
|
341
|
+
"$ref": "#/definitions/TagNamePreference"
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
"JSXA11yPluginSettings": {
|
|
347
|
+
"description": "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.",
|
|
348
|
+
"type": "object",
|
|
349
|
+
"properties": {
|
|
350
|
+
"attributes": {
|
|
351
|
+
"description": "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```",
|
|
352
|
+
"default": {},
|
|
353
|
+
"type": "object",
|
|
354
|
+
"additionalProperties": {
|
|
355
|
+
"type": "array",
|
|
356
|
+
"items": {
|
|
357
|
+
"type": "string"
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
"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```"
|
|
361
|
+
},
|
|
362
|
+
"components": {
|
|
363
|
+
"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```",
|
|
364
|
+
"default": {},
|
|
365
|
+
"type": "object",
|
|
366
|
+
"additionalProperties": {
|
|
367
|
+
"type": "string"
|
|
368
|
+
},
|
|
369
|
+
"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```"
|
|
370
|
+
},
|
|
371
|
+
"polymorphicPropName": {
|
|
372
|
+
"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`.",
|
|
373
|
+
"type": [
|
|
374
|
+
"string",
|
|
375
|
+
"null"
|
|
376
|
+
],
|
|
377
|
+
"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`."
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
"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."
|
|
381
|
+
},
|
|
382
|
+
"LintPluginOptionsSchema": {
|
|
383
|
+
"type": "string",
|
|
384
|
+
"enum": [
|
|
385
|
+
"eslint",
|
|
386
|
+
"react",
|
|
387
|
+
"unicorn",
|
|
388
|
+
"typescript",
|
|
389
|
+
"oxc",
|
|
390
|
+
"import",
|
|
391
|
+
"jsdoc",
|
|
392
|
+
"jest",
|
|
393
|
+
"vitest",
|
|
394
|
+
"jsx-a11y",
|
|
395
|
+
"nextjs",
|
|
396
|
+
"react-perf",
|
|
397
|
+
"promise",
|
|
398
|
+
"node",
|
|
399
|
+
"vue"
|
|
400
|
+
]
|
|
401
|
+
},
|
|
402
|
+
"LintPlugins": {
|
|
403
|
+
"type": "array",
|
|
404
|
+
"items": {
|
|
405
|
+
"anyOf": [
|
|
406
|
+
{
|
|
407
|
+
"$ref": "#/definitions/LintPluginOptionsSchema"
|
|
408
|
+
}
|
|
409
|
+
]
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
"NextPluginSettings": {
|
|
413
|
+
"description": "Configure Next.js plugin rules.",
|
|
414
|
+
"type": "object",
|
|
415
|
+
"properties": {
|
|
416
|
+
"rootDir": {
|
|
417
|
+
"description": "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```",
|
|
418
|
+
"default": [],
|
|
419
|
+
"allOf": [
|
|
420
|
+
{
|
|
421
|
+
"$ref": "#/definitions/OneOrMany_for_String"
|
|
422
|
+
}
|
|
423
|
+
],
|
|
424
|
+
"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```"
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
"markdownDescription": "Configure Next.js plugin rules."
|
|
428
|
+
},
|
|
429
|
+
"OneOrMany_for_String": {
|
|
430
|
+
"anyOf": [
|
|
431
|
+
{
|
|
432
|
+
"type": "string"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"type": "array",
|
|
436
|
+
"items": {
|
|
437
|
+
"type": "string"
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
]
|
|
441
|
+
},
|
|
442
|
+
"OxlintCategories": {
|
|
443
|
+
"title": "Rule Categories",
|
|
444
|
+
"description": "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```",
|
|
445
|
+
"examples": [
|
|
446
|
+
{
|
|
447
|
+
"correctness": "warn"
|
|
448
|
+
}
|
|
449
|
+
],
|
|
450
|
+
"type": "object",
|
|
451
|
+
"properties": {
|
|
452
|
+
"correctness": {
|
|
453
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
454
|
+
},
|
|
455
|
+
"nursery": {
|
|
456
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
457
|
+
},
|
|
458
|
+
"pedantic": {
|
|
459
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
460
|
+
},
|
|
461
|
+
"perf": {
|
|
462
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
463
|
+
},
|
|
464
|
+
"restriction": {
|
|
465
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
466
|
+
},
|
|
467
|
+
"style": {
|
|
468
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
469
|
+
},
|
|
470
|
+
"suspicious": {
|
|
471
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
"additionalProperties": false,
|
|
475
|
+
"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```"
|
|
476
|
+
},
|
|
477
|
+
"OxlintEnv": {
|
|
478
|
+
"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.",
|
|
479
|
+
"type": "object",
|
|
480
|
+
"additionalProperties": {
|
|
481
|
+
"type": "boolean"
|
|
482
|
+
},
|
|
483
|
+
"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."
|
|
484
|
+
},
|
|
485
|
+
"OxlintGlobals": {
|
|
486
|
+
"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\"`.",
|
|
487
|
+
"type": "object",
|
|
488
|
+
"additionalProperties": {
|
|
489
|
+
"$ref": "#/definitions/GlobalValue"
|
|
490
|
+
},
|
|
491
|
+
"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\"`."
|
|
492
|
+
},
|
|
493
|
+
"OxlintOptions": {
|
|
494
|
+
"description": "Options for the linter.",
|
|
495
|
+
"type": "object",
|
|
496
|
+
"properties": {
|
|
497
|
+
"denyWarnings": {
|
|
498
|
+
"description": "Ensure warnings produce a non-zero exit code.\n\nEquivalent to passing `--deny-warnings` on the CLI.",
|
|
499
|
+
"type": [
|
|
500
|
+
"boolean",
|
|
501
|
+
"null"
|
|
502
|
+
],
|
|
503
|
+
"markdownDescription": "Ensure warnings produce a non-zero exit code.\n\nEquivalent to passing `--deny-warnings` on the CLI."
|
|
504
|
+
},
|
|
505
|
+
"maxWarnings": {
|
|
506
|
+
"description": "Specify a warning threshold. Exits with an error status if warnings exceed this value.\n\nEquivalent to passing `--max-warnings` on the CLI.",
|
|
507
|
+
"type": [
|
|
508
|
+
"integer",
|
|
509
|
+
"null"
|
|
510
|
+
],
|
|
511
|
+
"format": "uint",
|
|
512
|
+
"minimum": 0.0,
|
|
513
|
+
"markdownDescription": "Specify a warning threshold. Exits with an error status if warnings exceed this value.\n\nEquivalent to passing `--max-warnings` on the CLI."
|
|
514
|
+
},
|
|
515
|
+
"reportUnusedDisableDirectives": {
|
|
516
|
+
"description": "Report unused disable directives (e.g. `// oxlint-disable-line` or `// eslint-disable-line`).\n\nEquivalent to passing `--report-unused-disable-directives-severity` on the CLI.\nCLI flags take precedence over this value when both are set.\nOnly supported in the root configuration file.",
|
|
517
|
+
"anyOf": [
|
|
518
|
+
{
|
|
519
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
"type": "null"
|
|
523
|
+
}
|
|
524
|
+
],
|
|
525
|
+
"markdownDescription": "Report unused disable directives (e.g. `// oxlint-disable-line` or `// eslint-disable-line`).\n\nEquivalent to passing `--report-unused-disable-directives-severity` on the CLI.\nCLI flags take precedence over this value when both are set.\nOnly supported in the root configuration file."
|
|
526
|
+
},
|
|
527
|
+
"typeAware": {
|
|
528
|
+
"description": "Enable rules that require type information.\n\nEquivalent to passing `--type-aware` on the CLI.\n\nNote that this requires the `oxlint-tsgolint` package to be installed.",
|
|
529
|
+
"type": [
|
|
530
|
+
"boolean",
|
|
531
|
+
"null"
|
|
532
|
+
],
|
|
533
|
+
"markdownDescription": "Enable rules that require type information.\n\nEquivalent to passing `--type-aware` on the CLI.\n\nNote that this requires the `oxlint-tsgolint` package to be installed."
|
|
534
|
+
},
|
|
535
|
+
"typeCheck": {
|
|
536
|
+
"description": "Enable experimental type checking (includes TypeScript compiler diagnostics).\n\nEquivalent to passing `--type-check` on the CLI.\n\nNote that this requires the `oxlint-tsgolint` package to be installed.",
|
|
537
|
+
"type": [
|
|
538
|
+
"boolean",
|
|
539
|
+
"null"
|
|
540
|
+
],
|
|
541
|
+
"markdownDescription": "Enable experimental type checking (includes TypeScript compiler diagnostics).\n\nEquivalent to passing `--type-check` on the CLI.\n\nNote that this requires the `oxlint-tsgolint` package to be installed."
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
"additionalProperties": false,
|
|
545
|
+
"markdownDescription": "Options for the linter."
|
|
546
|
+
},
|
|
547
|
+
"OxlintOverride": {
|
|
548
|
+
"type": "object",
|
|
549
|
+
"required": [
|
|
550
|
+
"files"
|
|
551
|
+
],
|
|
552
|
+
"properties": {
|
|
553
|
+
"env": {
|
|
554
|
+
"description": "Environments enable and disable collections of global variables.",
|
|
555
|
+
"anyOf": [
|
|
556
|
+
{
|
|
557
|
+
"$ref": "#/definitions/OxlintEnv"
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
"type": "null"
|
|
561
|
+
}
|
|
562
|
+
],
|
|
563
|
+
"markdownDescription": "Environments enable and disable collections of global variables."
|
|
564
|
+
},
|
|
565
|
+
"files": {
|
|
566
|
+
"description": "A list of glob patterns to override.\n\n## Example\n`[ \"*.test.ts\", \"*.spec.ts\" ]`",
|
|
567
|
+
"allOf": [
|
|
568
|
+
{
|
|
569
|
+
"$ref": "#/definitions/GlobSet"
|
|
570
|
+
}
|
|
571
|
+
],
|
|
572
|
+
"markdownDescription": "A list of glob patterns to override.\n\n## Example\n`[ \"*.test.ts\", \"*.spec.ts\" ]`"
|
|
573
|
+
},
|
|
574
|
+
"globals": {
|
|
575
|
+
"description": "Enabled or disabled specific global variables.",
|
|
576
|
+
"anyOf": [
|
|
577
|
+
{
|
|
578
|
+
"$ref": "#/definitions/OxlintGlobals"
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
"type": "null"
|
|
582
|
+
}
|
|
583
|
+
],
|
|
584
|
+
"markdownDescription": "Enabled or disabled specific global variables."
|
|
585
|
+
},
|
|
586
|
+
"jsPlugins": {
|
|
587
|
+
"description": "JS plugins for this override, allows usage of ESLint plugins with Oxlint.\n\nRead more about JS plugins in\n[the docs](https://oxc.rs/docs/guide/usage/linter/js-plugins.html).\n\nNote: JS plugins are experimental and not subject to semver.",
|
|
588
|
+
"anyOf": [
|
|
589
|
+
{
|
|
590
|
+
"type": "null"
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
"type": "array",
|
|
594
|
+
"items": {
|
|
595
|
+
"$ref": "#/definitions/ExternalPluginEntry"
|
|
596
|
+
},
|
|
597
|
+
"uniqueItems": true
|
|
598
|
+
}
|
|
599
|
+
],
|
|
600
|
+
"markdownDescription": "JS plugins for this override, allows usage of ESLint plugins with Oxlint.\n\nRead more about JS plugins in\n[the docs](https://oxc.rs/docs/guide/usage/linter/js-plugins.html).\n\nNote: JS plugins are experimental and not subject to semver."
|
|
601
|
+
},
|
|
602
|
+
"plugins": {
|
|
603
|
+
"description": "Optionally change what plugins are enabled for this override. When\nomitted, the base config's plugins are used.",
|
|
604
|
+
"default": null,
|
|
605
|
+
"anyOf": [
|
|
606
|
+
{
|
|
607
|
+
"$ref": "#/definitions/LintPlugins"
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"type": "null"
|
|
611
|
+
}
|
|
612
|
+
],
|
|
613
|
+
"markdownDescription": "Optionally change what plugins are enabled for this override. When\nomitted, the base config's plugins are used."
|
|
614
|
+
},
|
|
615
|
+
"rules": {
|
|
616
|
+
"default": {},
|
|
617
|
+
"allOf": [
|
|
618
|
+
{
|
|
619
|
+
"$ref": "#/definitions/OxlintRules"
|
|
620
|
+
}
|
|
621
|
+
]
|
|
622
|
+
}
|
|
623
|
+
},
|
|
624
|
+
"additionalProperties": false
|
|
625
|
+
},
|
|
626
|
+
"OxlintOverrides": {
|
|
627
|
+
"type": "array",
|
|
628
|
+
"items": {
|
|
629
|
+
"$ref": "#/definitions/OxlintOverride"
|
|
630
|
+
}
|
|
631
|
+
},
|
|
632
|
+
"OxlintRules": {
|
|
633
|
+
"$ref": "#/definitions/DummyRuleMap"
|
|
634
|
+
},
|
|
635
|
+
"OxlintSettings": {
|
|
636
|
+
"title": "Oxlint Plugin Settings",
|
|
637
|
+
"description": "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```",
|
|
638
|
+
"type": "object",
|
|
639
|
+
"properties": {
|
|
640
|
+
"jsdoc": {
|
|
641
|
+
"default": {
|
|
642
|
+
"ignorePrivate": false,
|
|
643
|
+
"ignoreInternal": false,
|
|
644
|
+
"ignoreReplacesDocs": true,
|
|
645
|
+
"overrideReplacesDocs": true,
|
|
646
|
+
"augmentsExtendsReplacesDocs": false,
|
|
647
|
+
"implementsReplacesDocs": false,
|
|
648
|
+
"exemptDestructuredRootsFromChecks": false,
|
|
649
|
+
"tagNamePreference": {}
|
|
650
|
+
},
|
|
651
|
+
"allOf": [
|
|
652
|
+
{
|
|
653
|
+
"$ref": "#/definitions/JSDocPluginSettings"
|
|
654
|
+
}
|
|
655
|
+
]
|
|
656
|
+
},
|
|
657
|
+
"jsx-a11y": {
|
|
658
|
+
"default": {
|
|
659
|
+
"polymorphicPropName": null,
|
|
660
|
+
"components": {},
|
|
661
|
+
"attributes": {}
|
|
662
|
+
},
|
|
663
|
+
"allOf": [
|
|
664
|
+
{
|
|
665
|
+
"$ref": "#/definitions/JSXA11yPluginSettings"
|
|
666
|
+
}
|
|
667
|
+
]
|
|
668
|
+
},
|
|
669
|
+
"next": {
|
|
670
|
+
"default": {
|
|
671
|
+
"rootDir": []
|
|
672
|
+
},
|
|
673
|
+
"allOf": [
|
|
674
|
+
{
|
|
675
|
+
"$ref": "#/definitions/NextPluginSettings"
|
|
676
|
+
}
|
|
677
|
+
]
|
|
678
|
+
},
|
|
679
|
+
"react": {
|
|
680
|
+
"default": {
|
|
681
|
+
"formComponents": [],
|
|
682
|
+
"linkComponents": [],
|
|
683
|
+
"version": null,
|
|
684
|
+
"componentWrapperFunctions": []
|
|
685
|
+
},
|
|
686
|
+
"allOf": [
|
|
687
|
+
{
|
|
688
|
+
"$ref": "#/definitions/ReactPluginSettings"
|
|
689
|
+
}
|
|
690
|
+
]
|
|
691
|
+
},
|
|
692
|
+
"vitest": {
|
|
693
|
+
"default": {
|
|
694
|
+
"typecheck": false
|
|
695
|
+
},
|
|
696
|
+
"allOf": [
|
|
697
|
+
{
|
|
698
|
+
"$ref": "#/definitions/VitestPluginSettings"
|
|
699
|
+
}
|
|
700
|
+
]
|
|
701
|
+
}
|
|
702
|
+
},
|
|
703
|
+
"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```"
|
|
704
|
+
},
|
|
705
|
+
"ReactPluginSettings": {
|
|
706
|
+
"description": "Configure React plugin rules.\n\nDerived from [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react#configuration-legacy-eslintrc-)",
|
|
707
|
+
"type": "object",
|
|
708
|
+
"properties": {
|
|
709
|
+
"componentWrapperFunctions": {
|
|
710
|
+
"description": "Functions that wrap React components and should be treated as HOCs.\n\nExample:\n\n```jsonc\n{\n\"settings\": {\n\"react\": {\n\"componentWrapperFunctions\": [\"observer\", \"withRouter\"]\n}\n}\n}\n```",
|
|
711
|
+
"default": [],
|
|
712
|
+
"type": "array",
|
|
713
|
+
"items": {
|
|
714
|
+
"type": "string"
|
|
715
|
+
},
|
|
716
|
+
"markdownDescription": "Functions that wrap React components and should be treated as HOCs.\n\nExample:\n\n```jsonc\n{\n\"settings\": {\n\"react\": {\n\"componentWrapperFunctions\": [\"observer\", \"withRouter\"]\n}\n}\n}\n```"
|
|
717
|
+
},
|
|
718
|
+
"formComponents": {
|
|
719
|
+
"description": "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```",
|
|
720
|
+
"default": [],
|
|
721
|
+
"type": "array",
|
|
722
|
+
"items": {
|
|
723
|
+
"$ref": "#/definitions/CustomComponent"
|
|
724
|
+
},
|
|
725
|
+
"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```"
|
|
726
|
+
},
|
|
727
|
+
"linkComponents": {
|
|
728
|
+
"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```",
|
|
729
|
+
"default": [],
|
|
730
|
+
"type": "array",
|
|
731
|
+
"items": {
|
|
732
|
+
"$ref": "#/definitions/CustomComponent"
|
|
733
|
+
},
|
|
734
|
+
"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```"
|
|
735
|
+
},
|
|
736
|
+
"version": {
|
|
737
|
+
"description": "React version to use for version-specific rules.\n\nAccepts semver versions (e.g., \"18.2.0\", \"17.0\").\n\nExample:\n\n```jsonc\n{\n\"settings\": {\n\"react\": {\n\"version\": \"18.2.0\"\n}\n}\n}\n```",
|
|
738
|
+
"default": null,
|
|
739
|
+
"type": [
|
|
740
|
+
"string",
|
|
741
|
+
"null"
|
|
742
|
+
],
|
|
743
|
+
"pattern": "^[1-9]\\d*(\\.(0|[1-9]\\d*))?(\\.(0|[1-9]\\d*))?$",
|
|
744
|
+
"markdownDescription": "React version to use for version-specific rules.\n\nAccepts semver versions (e.g., \"18.2.0\", \"17.0\").\n\nExample:\n\n```jsonc\n{\n\"settings\": {\n\"react\": {\n\"version\": \"18.2.0\"\n}\n}\n}\n```"
|
|
745
|
+
}
|
|
746
|
+
},
|
|
747
|
+
"markdownDescription": "Configure React plugin rules.\n\nDerived from [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react#configuration-legacy-eslintrc-)"
|
|
748
|
+
},
|
|
749
|
+
"TagNamePreference": {
|
|
750
|
+
"anyOf": [
|
|
751
|
+
{
|
|
752
|
+
"type": "string"
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
"type": "object",
|
|
756
|
+
"required": [
|
|
757
|
+
"message",
|
|
758
|
+
"replacement"
|
|
759
|
+
],
|
|
760
|
+
"properties": {
|
|
761
|
+
"message": {
|
|
762
|
+
"type": "string"
|
|
763
|
+
},
|
|
764
|
+
"replacement": {
|
|
765
|
+
"type": "string"
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
"type": "object",
|
|
771
|
+
"required": [
|
|
772
|
+
"message"
|
|
773
|
+
],
|
|
774
|
+
"properties": {
|
|
775
|
+
"message": {
|
|
776
|
+
"type": "string"
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
"type": "boolean"
|
|
782
|
+
}
|
|
783
|
+
]
|
|
784
|
+
},
|
|
785
|
+
"VitestPluginSettings": {
|
|
786
|
+
"description": "Configure Vitest plugin rules.\n\nSee [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest)'s\nconfiguration for a full reference.",
|
|
787
|
+
"type": "object",
|
|
788
|
+
"properties": {
|
|
789
|
+
"typecheck": {
|
|
790
|
+
"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.",
|
|
791
|
+
"default": false,
|
|
792
|
+
"type": "boolean",
|
|
793
|
+
"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."
|
|
794
|
+
}
|
|
795
|
+
},
|
|
796
|
+
"markdownDescription": "Configure Vitest plugin rules.\n\nSee [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest)'s\nconfiguration for a full reference."
|
|
797
|
+
}
|
|
798
|
+
},
|
|
799
|
+
"markdownDescription": "Oxlint Configuration File\n\nThis configuration is aligned with ESLint v8's configuration schema (`eslintrc.json`).\n\nUsage: `oxlint -c oxlintrc.json`\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\"react\": {\n\"version\": \"18.2.0\"\n},\n\"custom\": { \"option\": true }\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```\n\n`oxlint.config.ts`\n\n```ts\nimport { defineConfig } from \"oxlint\";\n\nexport default defineConfig({\nplugins: [\"import\", \"typescript\", \"unicorn\"],\nenv: {\n\"browser\": true\n},\nglobals: {\n\"foo\": \"readonly\"\n},\nsettings: {\nreact: {\nversion: \"18.2.0\"\n},\ncustom: { option: true }\n},\nrules: {\n\"eqeqeq\": \"warn\",\n\"import/no-cycle\": \"error\",\n\"react/self-closing-comp\": [\"error\", { \"html\": false }]\n},\noverrides: [\n{\nfiles: [\"*.test.ts\", \"*.spec.ts\"],\nrules: {\n\"@typescript-eslint/no-explicit-any\": \"off\"\n}\n}\n]\n}\n});\n```"
|
|
800
|
+
}
|