@ohos-rs/oxk 0.5.0 → 0.6.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/bin/oxk.js +15 -0
- package/configuration_schema.json +1817 -0
- package/format.d.ts +2 -0
- package/format.js +2 -3
- package/index.d.ts +3 -0
- package/index.js +53 -52
- package/lint.js +9 -0
- package/oxlint-runtime/plugins.cjs +1 -1
- package/package.json +19 -16
|
@@ -0,0 +1,1817 @@
|
|
|
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/@ohos-rs/oxk/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```",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"$schema": {
|
|
8
|
+
"description": "Schema URI for editor tooling.",
|
|
9
|
+
"type": "string",
|
|
10
|
+
"markdownDescription": "Schema URI for editor tooling."
|
|
11
|
+
},
|
|
12
|
+
"categories": {
|
|
13
|
+
"default": {},
|
|
14
|
+
"allOf": [
|
|
15
|
+
{
|
|
16
|
+
"$ref": "#/definitions/OxlintCategories"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"env": {
|
|
21
|
+
"description": "Environments enable and disable collections of global variables.",
|
|
22
|
+
"default": {
|
|
23
|
+
"builtin": true
|
|
24
|
+
},
|
|
25
|
+
"allOf": [
|
|
26
|
+
{
|
|
27
|
+
"$ref": "#/definitions/OxlintEnv"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"markdownDescription": "Environments enable and disable collections of global variables."
|
|
31
|
+
},
|
|
32
|
+
"extends": {
|
|
33
|
+
"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.",
|
|
34
|
+
"type": "array",
|
|
35
|
+
"items": {
|
|
36
|
+
"type": "string"
|
|
37
|
+
},
|
|
38
|
+
"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."
|
|
39
|
+
},
|
|
40
|
+
"globals": {
|
|
41
|
+
"description": "Enabled or disabled specific global variables.",
|
|
42
|
+
"default": {},
|
|
43
|
+
"allOf": [
|
|
44
|
+
{
|
|
45
|
+
"$ref": "#/definitions/OxlintGlobals"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"markdownDescription": "Enabled or disabled specific global variables."
|
|
49
|
+
},
|
|
50
|
+
"ignorePatterns": {
|
|
51
|
+
"description": "Globs to ignore during linting. These are resolved from the configuration file path.",
|
|
52
|
+
"default": [],
|
|
53
|
+
"type": "array",
|
|
54
|
+
"items": {
|
|
55
|
+
"type": "string"
|
|
56
|
+
},
|
|
57
|
+
"markdownDescription": "Globs to ignore during linting. These are resolved from the configuration file path."
|
|
58
|
+
},
|
|
59
|
+
"jsPlugins": {
|
|
60
|
+
"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 in alpha 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\nBasic usage with a TypeScript plugin and a local plugin path.\n\nTypeScript plugin files are supported in the following environments:\n- Deno and Bun: TypeScript files are supported natively.\n- Node.js >=22.18.0 and Node.js ^20.19.0: TypeScript files are supported natively with built-in\ntype-stripping enabled by default.\n\nFor older Node.js versions, TypeScript plugins are not supported. Please use JavaScript plugins or upgrade your Node version.\n\n```json\n{\n\"jsPlugins\": [\"./custom-plugin.ts\"],\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```",
|
|
61
|
+
"anyOf": [
|
|
62
|
+
{
|
|
63
|
+
"type": "null"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"type": "array",
|
|
67
|
+
"items": {
|
|
68
|
+
"$ref": "#/definitions/ExternalPluginEntry"
|
|
69
|
+
},
|
|
70
|
+
"uniqueItems": true
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"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 in alpha 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\nBasic usage with a TypeScript plugin and a local plugin path.\n\nTypeScript plugin files are supported in the following environments:\n- Deno and Bun: TypeScript files are supported natively.\n- Node.js >=22.18.0 and Node.js ^20.19.0: TypeScript files are supported natively with built-in\ntype-stripping enabled by default.\n\nFor older Node.js versions, TypeScript plugins are not supported. Please use JavaScript plugins or upgrade your Node version.\n\n```json\n{\n\"jsPlugins\": [\"./custom-plugin.ts\"],\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```"
|
|
74
|
+
},
|
|
75
|
+
"options": {
|
|
76
|
+
"description": "Oxlint config options.",
|
|
77
|
+
"allOf": [
|
|
78
|
+
{
|
|
79
|
+
"$ref": "#/definitions/OxlintOptions"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"markdownDescription": "Oxlint config options."
|
|
83
|
+
},
|
|
84
|
+
"overrides": {
|
|
85
|
+
"description": "Add, remove, or otherwise reconfigure rules for specific files or groups of files.",
|
|
86
|
+
"allOf": [
|
|
87
|
+
{
|
|
88
|
+
"$ref": "#/definitions/OxlintOverrides"
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"markdownDescription": "Add, remove, or otherwise reconfigure rules for specific files or groups of files."
|
|
92
|
+
},
|
|
93
|
+
"plugins": {
|
|
94
|
+
"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.",
|
|
95
|
+
"default": null,
|
|
96
|
+
"allOf": [
|
|
97
|
+
{
|
|
98
|
+
"$ref": "#/definitions/LintPlugins"
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"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."
|
|
102
|
+
},
|
|
103
|
+
"rules": {
|
|
104
|
+
"description": "Example\n\n`.oxlintrc.json`\n\n```json\n{\n\"$schema\": \"./node_modules/@ohos-rs/oxk/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.",
|
|
105
|
+
"default": {},
|
|
106
|
+
"allOf": [
|
|
107
|
+
{
|
|
108
|
+
"$ref": "#/definitions/OxlintRules"
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
"markdownDescription": "Example\n\n`.oxlintrc.json`\n\n```json\n{\n\"$schema\": \"./node_modules/@ohos-rs/oxk/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."
|
|
112
|
+
},
|
|
113
|
+
"settings": {
|
|
114
|
+
"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`.",
|
|
115
|
+
"default": {
|
|
116
|
+
"jsx-a11y": {
|
|
117
|
+
"polymorphicPropName": null,
|
|
118
|
+
"components": {},
|
|
119
|
+
"attributes": {}
|
|
120
|
+
},
|
|
121
|
+
"next": {
|
|
122
|
+
"rootDir": []
|
|
123
|
+
},
|
|
124
|
+
"react": {
|
|
125
|
+
"formComponents": [],
|
|
126
|
+
"linkComponents": [],
|
|
127
|
+
"version": null,
|
|
128
|
+
"componentWrapperFunctions": []
|
|
129
|
+
},
|
|
130
|
+
"jsdoc": {
|
|
131
|
+
"ignorePrivate": false,
|
|
132
|
+
"ignoreInternal": false,
|
|
133
|
+
"ignoreReplacesDocs": true,
|
|
134
|
+
"overrideReplacesDocs": true,
|
|
135
|
+
"augmentsExtendsReplacesDocs": false,
|
|
136
|
+
"implementsReplacesDocs": false,
|
|
137
|
+
"exemptDestructuredRootsFromChecks": false,
|
|
138
|
+
"tagNamePreference": {}
|
|
139
|
+
},
|
|
140
|
+
"vitest": {
|
|
141
|
+
"typecheck": false
|
|
142
|
+
},
|
|
143
|
+
"jest": {
|
|
144
|
+
"version": null
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"allOf": [
|
|
148
|
+
{
|
|
149
|
+
"$ref": "#/definitions/OxlintSettings"
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
"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`."
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"additionalProperties": false,
|
|
156
|
+
"allowComments": true,
|
|
157
|
+
"allowTrailingCommas": true,
|
|
158
|
+
"definitions": {
|
|
159
|
+
"AllowWarnDeny": {
|
|
160
|
+
"oneOf": [
|
|
161
|
+
{
|
|
162
|
+
"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).",
|
|
163
|
+
"type": "string",
|
|
164
|
+
"enum": ["allow", "off", "warn", "error", "deny"],
|
|
165
|
+
"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)."
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"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).",
|
|
169
|
+
"type": "integer",
|
|
170
|
+
"format": "uint32",
|
|
171
|
+
"maximum": 2.0,
|
|
172
|
+
"minimum": 0.0,
|
|
173
|
+
"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)."
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
},
|
|
177
|
+
"CustomComponent": {
|
|
178
|
+
"anyOf": [
|
|
179
|
+
{
|
|
180
|
+
"type": "string"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"type": "object",
|
|
184
|
+
"required": ["attribute", "name"],
|
|
185
|
+
"properties": {
|
|
186
|
+
"attribute": {
|
|
187
|
+
"type": "string"
|
|
188
|
+
},
|
|
189
|
+
"name": {
|
|
190
|
+
"type": "string"
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"type": "object",
|
|
196
|
+
"required": ["attributes", "name"],
|
|
197
|
+
"properties": {
|
|
198
|
+
"attributes": {
|
|
199
|
+
"type": "array",
|
|
200
|
+
"items": {
|
|
201
|
+
"type": "string"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"name": {
|
|
205
|
+
"type": "string"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
"DummyRule": {
|
|
212
|
+
"anyOf": [
|
|
213
|
+
{
|
|
214
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"type": "array",
|
|
218
|
+
"items": [
|
|
219
|
+
{
|
|
220
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
"additionalItems": true,
|
|
224
|
+
"minItems": 1
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
},
|
|
228
|
+
"DummyRuleMap": {
|
|
229
|
+
"description": "See [Oxlint Rules](https://oxc.rs/docs/guide/usage/linter/rules.html)",
|
|
230
|
+
"type": "object",
|
|
231
|
+
"additionalProperties": {
|
|
232
|
+
"$ref": "#/definitions/DummyRule"
|
|
233
|
+
},
|
|
234
|
+
"properties": {
|
|
235
|
+
"arkts/identifiers-as-prop-names": {
|
|
236
|
+
"description": "ArkTS requires object property names to be valid identifiers. (10605001)",
|
|
237
|
+
"allOf": [
|
|
238
|
+
{
|
|
239
|
+
"$ref": "#/definitions/ArktsRule"
|
|
240
|
+
}
|
|
241
|
+
],
|
|
242
|
+
"markdownDescription": "ArkTS requires object property names to be valid identifiers. (10605001)"
|
|
243
|
+
},
|
|
244
|
+
"arkts/no-symbol": {
|
|
245
|
+
"description": "ArkTS does not support Symbol() or the symbol type. (10605002)",
|
|
246
|
+
"allOf": [
|
|
247
|
+
{
|
|
248
|
+
"$ref": "#/definitions/ArktsRule"
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
"markdownDescription": "ArkTS does not support Symbol() or the symbol type. (10605002)"
|
|
252
|
+
},
|
|
253
|
+
"arkts/no-private-identifiers": {
|
|
254
|
+
"description": "ArkTS does not support private identifiers starting with #. Use the private keyword instead. (10605003)",
|
|
255
|
+
"allOf": [
|
|
256
|
+
{
|
|
257
|
+
"$ref": "#/definitions/ArktsRule"
|
|
258
|
+
}
|
|
259
|
+
],
|
|
260
|
+
"markdownDescription": "ArkTS does not support private identifiers starting with #. Use the private keyword instead. (10605003)"
|
|
261
|
+
},
|
|
262
|
+
"arkts/unique-names": {
|
|
263
|
+
"description": "ArkTS requires unique names for types, namespaces, and values. (10605004)",
|
|
264
|
+
"allOf": [
|
|
265
|
+
{
|
|
266
|
+
"$ref": "#/definitions/ArktsRule"
|
|
267
|
+
}
|
|
268
|
+
],
|
|
269
|
+
"markdownDescription": "ArkTS requires unique names for types, namespaces, and values. (10605004)"
|
|
270
|
+
},
|
|
271
|
+
"arkts/no-var": {
|
|
272
|
+
"description": "ArkTS does not support var. Use let or const instead. (10605005)",
|
|
273
|
+
"allOf": [
|
|
274
|
+
{
|
|
275
|
+
"$ref": "#/definitions/ArktsRule"
|
|
276
|
+
}
|
|
277
|
+
],
|
|
278
|
+
"markdownDescription": "ArkTS does not support var. Use let or const instead. (10605005)"
|
|
279
|
+
},
|
|
280
|
+
"arkts/no-any-unknown": {
|
|
281
|
+
"description": "ArkTS does not support any or unknown. Specify an explicit type. (10605008)",
|
|
282
|
+
"allOf": [
|
|
283
|
+
{
|
|
284
|
+
"$ref": "#/definitions/ArktsRule"
|
|
285
|
+
}
|
|
286
|
+
],
|
|
287
|
+
"markdownDescription": "ArkTS does not support any or unknown. Specify an explicit type. (10605008)"
|
|
288
|
+
},
|
|
289
|
+
"arkts/no-call-signatures": {
|
|
290
|
+
"description": "ArkTS does not support call signatures in object types. (10605014)",
|
|
291
|
+
"allOf": [
|
|
292
|
+
{
|
|
293
|
+
"$ref": "#/definitions/ArktsRule"
|
|
294
|
+
}
|
|
295
|
+
],
|
|
296
|
+
"markdownDescription": "ArkTS does not support call signatures in object types. (10605014)"
|
|
297
|
+
},
|
|
298
|
+
"arkts/no-ctor-signatures-type": {
|
|
299
|
+
"description": "ArkTS does not support constructor signatures in object types. (10605015)",
|
|
300
|
+
"allOf": [
|
|
301
|
+
{
|
|
302
|
+
"$ref": "#/definitions/ArktsRule"
|
|
303
|
+
}
|
|
304
|
+
],
|
|
305
|
+
"markdownDescription": "ArkTS does not support constructor signatures in object types. (10605015)"
|
|
306
|
+
},
|
|
307
|
+
"arkts/no-multiple-static-blocks": {
|
|
308
|
+
"description": "ArkTS supports only one static block per class. (10605016)",
|
|
309
|
+
"allOf": [
|
|
310
|
+
{
|
|
311
|
+
"$ref": "#/definitions/ArktsRule"
|
|
312
|
+
}
|
|
313
|
+
],
|
|
314
|
+
"markdownDescription": "ArkTS supports only one static block per class. (10605016)"
|
|
315
|
+
},
|
|
316
|
+
"arkts/no-indexed-signatures": {
|
|
317
|
+
"description": "ArkTS does not support index signatures. (10605017)",
|
|
318
|
+
"allOf": [
|
|
319
|
+
{
|
|
320
|
+
"$ref": "#/definitions/ArktsRule"
|
|
321
|
+
}
|
|
322
|
+
],
|
|
323
|
+
"markdownDescription": "ArkTS does not support index signatures. (10605017)"
|
|
324
|
+
},
|
|
325
|
+
"arkts/no-intersection-types": {
|
|
326
|
+
"description": "ArkTS does not support intersection types. Use inheritance instead. (10605019)",
|
|
327
|
+
"allOf": [
|
|
328
|
+
{
|
|
329
|
+
"$ref": "#/definitions/ArktsRule"
|
|
330
|
+
}
|
|
331
|
+
],
|
|
332
|
+
"markdownDescription": "ArkTS does not support intersection types. Use inheritance instead. (10605019)"
|
|
333
|
+
},
|
|
334
|
+
"arkts/no-typing-with-this": {
|
|
335
|
+
"description": "ArkTS does not support this in type positions. (10605021)",
|
|
336
|
+
"allOf": [
|
|
337
|
+
{
|
|
338
|
+
"$ref": "#/definitions/ArktsRule"
|
|
339
|
+
}
|
|
340
|
+
],
|
|
341
|
+
"markdownDescription": "ArkTS does not support this in type positions. (10605021)"
|
|
342
|
+
},
|
|
343
|
+
"arkts/no-conditional-types": {
|
|
344
|
+
"description": "ArkTS does not support conditional types or infer types. (10605022)",
|
|
345
|
+
"allOf": [
|
|
346
|
+
{
|
|
347
|
+
"$ref": "#/definitions/ArktsRule"
|
|
348
|
+
}
|
|
349
|
+
],
|
|
350
|
+
"markdownDescription": "ArkTS does not support conditional types or infer types. (10605022)"
|
|
351
|
+
},
|
|
352
|
+
"arkts/no-ctor-prop-decls": {
|
|
353
|
+
"description": "ArkTS does not support declaring properties in constructor parameters. (10605025)",
|
|
354
|
+
"allOf": [
|
|
355
|
+
{
|
|
356
|
+
"$ref": "#/definitions/ArktsRule"
|
|
357
|
+
}
|
|
358
|
+
],
|
|
359
|
+
"markdownDescription": "ArkTS does not support declaring properties in constructor parameters. (10605025)"
|
|
360
|
+
},
|
|
361
|
+
"arkts/no-ctor-signatures-iface": {
|
|
362
|
+
"description": "ArkTS does not support constructor signatures in interfaces. (10605027)",
|
|
363
|
+
"allOf": [
|
|
364
|
+
{
|
|
365
|
+
"$ref": "#/definitions/ArktsRule"
|
|
366
|
+
}
|
|
367
|
+
],
|
|
368
|
+
"markdownDescription": "ArkTS does not support constructor signatures in interfaces. (10605027)"
|
|
369
|
+
},
|
|
370
|
+
"arkts/no-aliases-by-index": {
|
|
371
|
+
"description": "ArkTS does not support indexed access types. (10605028)",
|
|
372
|
+
"allOf": [
|
|
373
|
+
{
|
|
374
|
+
"$ref": "#/definitions/ArktsRule"
|
|
375
|
+
}
|
|
376
|
+
],
|
|
377
|
+
"markdownDescription": "ArkTS does not support indexed access types. (10605028)"
|
|
378
|
+
},
|
|
379
|
+
"arkts/no-props-by-index": {
|
|
380
|
+
"description": "ArkTS does not support property access by non-numeric indexes. (10605029)",
|
|
381
|
+
"allOf": [
|
|
382
|
+
{
|
|
383
|
+
"$ref": "#/definitions/ArktsRule"
|
|
384
|
+
}
|
|
385
|
+
],
|
|
386
|
+
"markdownDescription": "ArkTS does not support property access by non-numeric indexes. (10605029)"
|
|
387
|
+
},
|
|
388
|
+
"arkts/no-structural-typing": {
|
|
389
|
+
"description": "ArkTS does not support structural typing. (10605030)",
|
|
390
|
+
"allOf": [
|
|
391
|
+
{
|
|
392
|
+
"$ref": "#/definitions/ArktsRule"
|
|
393
|
+
}
|
|
394
|
+
],
|
|
395
|
+
"markdownDescription": "ArkTS does not support structural typing. (10605030)"
|
|
396
|
+
},
|
|
397
|
+
"arkts/no-inferred-generic-params": {
|
|
398
|
+
"description": "ArkTS limits type inference for generic function calls. (10605034)",
|
|
399
|
+
"allOf": [
|
|
400
|
+
{
|
|
401
|
+
"$ref": "#/definitions/ArktsRule"
|
|
402
|
+
}
|
|
403
|
+
],
|
|
404
|
+
"markdownDescription": "ArkTS limits type inference for generic function calls. (10605034)"
|
|
405
|
+
},
|
|
406
|
+
"arkts/no-untyped-obj-literals": {
|
|
407
|
+
"description": "ArkTS requires object literals to have inferrable or explicit types. (10605038)",
|
|
408
|
+
"allOf": [
|
|
409
|
+
{
|
|
410
|
+
"$ref": "#/definitions/ArktsRule"
|
|
411
|
+
}
|
|
412
|
+
],
|
|
413
|
+
"markdownDescription": "ArkTS requires object literals to have inferrable or explicit types. (10605038)"
|
|
414
|
+
},
|
|
415
|
+
"arkts/no-obj-literals-as-types": {
|
|
416
|
+
"description": "ArkTS does not support object literal types. (10605040)",
|
|
417
|
+
"allOf": [
|
|
418
|
+
{
|
|
419
|
+
"$ref": "#/definitions/ArktsRule"
|
|
420
|
+
}
|
|
421
|
+
],
|
|
422
|
+
"markdownDescription": "ArkTS does not support object literal types. (10605040)"
|
|
423
|
+
},
|
|
424
|
+
"arkts/no-noninferrable-arr-literals": {
|
|
425
|
+
"description": "ArkTS requires array literal element types to be inferrable. (10605043)",
|
|
426
|
+
"allOf": [
|
|
427
|
+
{
|
|
428
|
+
"$ref": "#/definitions/ArktsRule"
|
|
429
|
+
}
|
|
430
|
+
],
|
|
431
|
+
"markdownDescription": "ArkTS requires array literal element types to be inferrable. (10605043)"
|
|
432
|
+
},
|
|
433
|
+
"arkts/no-func-expressions": {
|
|
434
|
+
"description": "ArkTS does not support function expressions. Use arrow functions instead. (10605046)",
|
|
435
|
+
"allOf": [
|
|
436
|
+
{
|
|
437
|
+
"$ref": "#/definitions/ArktsRule"
|
|
438
|
+
}
|
|
439
|
+
],
|
|
440
|
+
"markdownDescription": "ArkTS does not support function expressions. Use arrow functions instead. (10605046)"
|
|
441
|
+
},
|
|
442
|
+
"arkts/no-class-literals": {
|
|
443
|
+
"description": "ArkTS does not support class expressions. (10605050)",
|
|
444
|
+
"allOf": [
|
|
445
|
+
{
|
|
446
|
+
"$ref": "#/definitions/ArktsRule"
|
|
447
|
+
}
|
|
448
|
+
],
|
|
449
|
+
"markdownDescription": "ArkTS does not support class expressions. (10605050)"
|
|
450
|
+
},
|
|
451
|
+
"arkts/implements-only-iface": {
|
|
452
|
+
"description": "ArkTS classes may implement interfaces only. (10605051)",
|
|
453
|
+
"allOf": [
|
|
454
|
+
{
|
|
455
|
+
"$ref": "#/definitions/ArktsRule"
|
|
456
|
+
}
|
|
457
|
+
],
|
|
458
|
+
"markdownDescription": "ArkTS classes may implement interfaces only. (10605051)"
|
|
459
|
+
},
|
|
460
|
+
"arkts/no-method-reassignment": {
|
|
461
|
+
"description": "ArkTS does not support method reassignment. (10605052)",
|
|
462
|
+
"allOf": [
|
|
463
|
+
{
|
|
464
|
+
"$ref": "#/definitions/ArktsRule"
|
|
465
|
+
}
|
|
466
|
+
],
|
|
467
|
+
"markdownDescription": "ArkTS does not support method reassignment. (10605052)"
|
|
468
|
+
},
|
|
469
|
+
"arkts/as-casts": {
|
|
470
|
+
"description": "ArkTS supports as casts only. (10605053)",
|
|
471
|
+
"allOf": [
|
|
472
|
+
{
|
|
473
|
+
"$ref": "#/definitions/ArktsRule"
|
|
474
|
+
}
|
|
475
|
+
],
|
|
476
|
+
"markdownDescription": "ArkTS supports as casts only. (10605053)"
|
|
477
|
+
},
|
|
478
|
+
"arkts/no-jsx": {
|
|
479
|
+
"description": "ArkTS does not support JSX. (10605054)",
|
|
480
|
+
"allOf": [
|
|
481
|
+
{
|
|
482
|
+
"$ref": "#/definitions/ArktsRule"
|
|
483
|
+
}
|
|
484
|
+
],
|
|
485
|
+
"markdownDescription": "ArkTS does not support JSX. (10605054)"
|
|
486
|
+
},
|
|
487
|
+
"arkts/no-polymorphic-unops": {
|
|
488
|
+
"description": "ArkTS restricts unary operator semantics. (10605055)",
|
|
489
|
+
"allOf": [
|
|
490
|
+
{
|
|
491
|
+
"$ref": "#/definitions/ArktsRule"
|
|
492
|
+
}
|
|
493
|
+
],
|
|
494
|
+
"markdownDescription": "ArkTS restricts unary operator semantics. (10605055)"
|
|
495
|
+
},
|
|
496
|
+
"arkts/no-delete": {
|
|
497
|
+
"description": "ArkTS does not support the delete operator. (10605059)",
|
|
498
|
+
"allOf": [
|
|
499
|
+
{
|
|
500
|
+
"$ref": "#/definitions/ArktsRule"
|
|
501
|
+
}
|
|
502
|
+
],
|
|
503
|
+
"markdownDescription": "ArkTS does not support the delete operator. (10605059)"
|
|
504
|
+
},
|
|
505
|
+
"arkts/no-type-query": {
|
|
506
|
+
"description": "ArkTS does not support typeof in type positions. (10605060)",
|
|
507
|
+
"allOf": [
|
|
508
|
+
{
|
|
509
|
+
"$ref": "#/definitions/ArktsRule"
|
|
510
|
+
}
|
|
511
|
+
],
|
|
512
|
+
"markdownDescription": "ArkTS does not support typeof in type positions. (10605060)"
|
|
513
|
+
},
|
|
514
|
+
"arkts/instanceof-ref-types": {
|
|
515
|
+
"description": "ArkTS restricts instanceof to reference types. (10605065)",
|
|
516
|
+
"allOf": [
|
|
517
|
+
{
|
|
518
|
+
"$ref": "#/definitions/ArktsRule"
|
|
519
|
+
}
|
|
520
|
+
],
|
|
521
|
+
"markdownDescription": "ArkTS restricts instanceof to reference types. (10605065)"
|
|
522
|
+
},
|
|
523
|
+
"arkts/no-in": {
|
|
524
|
+
"description": "ArkTS does not support the in operator. (10605066)",
|
|
525
|
+
"allOf": [
|
|
526
|
+
{
|
|
527
|
+
"$ref": "#/definitions/ArktsRule"
|
|
528
|
+
}
|
|
529
|
+
],
|
|
530
|
+
"markdownDescription": "ArkTS does not support the in operator. (10605066)"
|
|
531
|
+
},
|
|
532
|
+
"arkts/no-destruct-assignment": {
|
|
533
|
+
"description": "ArkTS does not support destructuring assignment. (10605069)",
|
|
534
|
+
"allOf": [
|
|
535
|
+
{
|
|
536
|
+
"$ref": "#/definitions/ArktsRule"
|
|
537
|
+
}
|
|
538
|
+
],
|
|
539
|
+
"markdownDescription": "ArkTS does not support destructuring assignment. (10605069)"
|
|
540
|
+
},
|
|
541
|
+
"arkts/no-comma-outside-loops": {
|
|
542
|
+
"description": "ArkTS restricts comma expressions outside loops. (10605071)",
|
|
543
|
+
"allOf": [
|
|
544
|
+
{
|
|
545
|
+
"$ref": "#/definitions/ArktsRule"
|
|
546
|
+
}
|
|
547
|
+
],
|
|
548
|
+
"markdownDescription": "ArkTS restricts comma expressions outside loops. (10605071)"
|
|
549
|
+
},
|
|
550
|
+
"arkts/no-destruct-decls": {
|
|
551
|
+
"description": "ArkTS does not support destructuring declarations. (10605074)",
|
|
552
|
+
"allOf": [
|
|
553
|
+
{
|
|
554
|
+
"$ref": "#/definitions/ArktsRule"
|
|
555
|
+
}
|
|
556
|
+
],
|
|
557
|
+
"markdownDescription": "ArkTS does not support destructuring declarations. (10605074)"
|
|
558
|
+
},
|
|
559
|
+
"arkts/no-types-in-catch": {
|
|
560
|
+
"description": "ArkTS does not support type annotations in catch clauses. (10605079)",
|
|
561
|
+
"allOf": [
|
|
562
|
+
{
|
|
563
|
+
"$ref": "#/definitions/ArktsRule"
|
|
564
|
+
}
|
|
565
|
+
],
|
|
566
|
+
"markdownDescription": "ArkTS does not support type annotations in catch clauses. (10605079)"
|
|
567
|
+
},
|
|
568
|
+
"arkts/no-for-in": {
|
|
569
|
+
"description": "ArkTS does not support for-in statements. (10605080)",
|
|
570
|
+
"allOf": [
|
|
571
|
+
{
|
|
572
|
+
"$ref": "#/definitions/ArktsRule"
|
|
573
|
+
}
|
|
574
|
+
],
|
|
575
|
+
"markdownDescription": "ArkTS does not support for-in statements. (10605080)"
|
|
576
|
+
},
|
|
577
|
+
"arkts/no-mapped-types": {
|
|
578
|
+
"description": "ArkTS does not support mapped types. (10605083)",
|
|
579
|
+
"allOf": [
|
|
580
|
+
{
|
|
581
|
+
"$ref": "#/definitions/ArktsRule"
|
|
582
|
+
}
|
|
583
|
+
],
|
|
584
|
+
"markdownDescription": "ArkTS does not support mapped types. (10605083)"
|
|
585
|
+
},
|
|
586
|
+
"arkts/no-with": {
|
|
587
|
+
"description": "ArkTS does not support with statements. (10605084)",
|
|
588
|
+
"allOf": [
|
|
589
|
+
{
|
|
590
|
+
"$ref": "#/definitions/ArktsRule"
|
|
591
|
+
}
|
|
592
|
+
],
|
|
593
|
+
"markdownDescription": "ArkTS does not support with statements. (10605084)"
|
|
594
|
+
},
|
|
595
|
+
"arkts/limited-throw": {
|
|
596
|
+
"description": "ArkTS restricts thrown values to Error-derived objects. (10605087)",
|
|
597
|
+
"allOf": [
|
|
598
|
+
{
|
|
599
|
+
"$ref": "#/definitions/ArktsRule"
|
|
600
|
+
}
|
|
601
|
+
],
|
|
602
|
+
"markdownDescription": "ArkTS restricts thrown values to Error-derived objects. (10605087)"
|
|
603
|
+
},
|
|
604
|
+
"arkts/no-implicit-return-types": {
|
|
605
|
+
"description": "ArkTS requires explicit return types for functions and methods. (10605090)",
|
|
606
|
+
"allOf": [
|
|
607
|
+
{
|
|
608
|
+
"$ref": "#/definitions/ArktsRule"
|
|
609
|
+
}
|
|
610
|
+
],
|
|
611
|
+
"markdownDescription": "ArkTS requires explicit return types for functions and methods. (10605090)"
|
|
612
|
+
},
|
|
613
|
+
"arkts/no-destruct-params": {
|
|
614
|
+
"description": "ArkTS does not support destructuring parameters. (10605091)",
|
|
615
|
+
"allOf": [
|
|
616
|
+
{
|
|
617
|
+
"$ref": "#/definitions/ArktsRule"
|
|
618
|
+
}
|
|
619
|
+
],
|
|
620
|
+
"markdownDescription": "ArkTS does not support destructuring parameters. (10605091)"
|
|
621
|
+
},
|
|
622
|
+
"arkts/no-nested-funcs": {
|
|
623
|
+
"description": "ArkTS does not support nested function declarations. (10605092)",
|
|
624
|
+
"allOf": [
|
|
625
|
+
{
|
|
626
|
+
"$ref": "#/definitions/ArktsRule"
|
|
627
|
+
}
|
|
628
|
+
],
|
|
629
|
+
"markdownDescription": "ArkTS does not support nested function declarations. (10605092)"
|
|
630
|
+
},
|
|
631
|
+
"arkts/no-standalone-this": {
|
|
632
|
+
"description": "ArkTS does not support standalone this. (10605093)",
|
|
633
|
+
"allOf": [
|
|
634
|
+
{
|
|
635
|
+
"$ref": "#/definitions/ArktsRule"
|
|
636
|
+
}
|
|
637
|
+
],
|
|
638
|
+
"markdownDescription": "ArkTS does not support standalone this. (10605093)"
|
|
639
|
+
},
|
|
640
|
+
"arkts/no-generators": {
|
|
641
|
+
"description": "ArkTS does not support generator functions. (10605094)",
|
|
642
|
+
"allOf": [
|
|
643
|
+
{
|
|
644
|
+
"$ref": "#/definitions/ArktsRule"
|
|
645
|
+
}
|
|
646
|
+
],
|
|
647
|
+
"markdownDescription": "ArkTS does not support generator functions. (10605094)"
|
|
648
|
+
},
|
|
649
|
+
"arkts/no-is": {
|
|
650
|
+
"description": "ArkTS does not support is type predicates. (10605096)",
|
|
651
|
+
"allOf": [
|
|
652
|
+
{
|
|
653
|
+
"$ref": "#/definitions/ArktsRule"
|
|
654
|
+
}
|
|
655
|
+
],
|
|
656
|
+
"markdownDescription": "ArkTS does not support is type predicates. (10605096)"
|
|
657
|
+
},
|
|
658
|
+
"arkts/no-spread": {
|
|
659
|
+
"description": "ArkTS restricts spread syntax. (10605099)",
|
|
660
|
+
"allOf": [
|
|
661
|
+
{
|
|
662
|
+
"$ref": "#/definitions/ArktsRule"
|
|
663
|
+
}
|
|
664
|
+
],
|
|
665
|
+
"markdownDescription": "ArkTS restricts spread syntax. (10605099)"
|
|
666
|
+
},
|
|
667
|
+
"arkts/no-extend-same-prop": {
|
|
668
|
+
"description": "ArkTS interfaces cannot extend interfaces with duplicate properties. (106050102)",
|
|
669
|
+
"allOf": [
|
|
670
|
+
{
|
|
671
|
+
"$ref": "#/definitions/ArktsRule"
|
|
672
|
+
}
|
|
673
|
+
],
|
|
674
|
+
"markdownDescription": "ArkTS interfaces cannot extend interfaces with duplicate properties. (106050102)"
|
|
675
|
+
},
|
|
676
|
+
"arkts/no-decl-merging": {
|
|
677
|
+
"description": "ArkTS does not support declaration merging. (10605103)",
|
|
678
|
+
"allOf": [
|
|
679
|
+
{
|
|
680
|
+
"$ref": "#/definitions/ArktsRule"
|
|
681
|
+
}
|
|
682
|
+
],
|
|
683
|
+
"markdownDescription": "ArkTS does not support declaration merging. (10605103)"
|
|
684
|
+
},
|
|
685
|
+
"arkts/extends-only-class": {
|
|
686
|
+
"description": "ArkTS classes can extend classes only. (10605104)",
|
|
687
|
+
"allOf": [
|
|
688
|
+
{
|
|
689
|
+
"$ref": "#/definitions/ArktsRule"
|
|
690
|
+
}
|
|
691
|
+
],
|
|
692
|
+
"markdownDescription": "ArkTS classes can extend classes only. (10605104)"
|
|
693
|
+
},
|
|
694
|
+
"arkts/no-ctor-signatures-funcs": {
|
|
695
|
+
"description": "ArkTS does not support constructor function types. (10605106)",
|
|
696
|
+
"allOf": [
|
|
697
|
+
{
|
|
698
|
+
"$ref": "#/definitions/ArktsRule"
|
|
699
|
+
}
|
|
700
|
+
],
|
|
701
|
+
"markdownDescription": "ArkTS does not support constructor function types. (10605106)"
|
|
702
|
+
},
|
|
703
|
+
"arkts/no-enum-mixed-types": {
|
|
704
|
+
"description": "ArkTS enum members must be initialized with same-type compile-time expressions. (10605111)",
|
|
705
|
+
"allOf": [
|
|
706
|
+
{
|
|
707
|
+
"$ref": "#/definitions/ArktsRule"
|
|
708
|
+
}
|
|
709
|
+
],
|
|
710
|
+
"markdownDescription": "ArkTS enum members must be initialized with same-type compile-time expressions. (10605111)"
|
|
711
|
+
},
|
|
712
|
+
"arkts/no-enum-merging": {
|
|
713
|
+
"description": "ArkTS does not support enum declaration merging. (10605113)",
|
|
714
|
+
"allOf": [
|
|
715
|
+
{
|
|
716
|
+
"$ref": "#/definitions/ArktsRule"
|
|
717
|
+
}
|
|
718
|
+
],
|
|
719
|
+
"markdownDescription": "ArkTS does not support enum declaration merging. (10605113)"
|
|
720
|
+
},
|
|
721
|
+
"arkts/no-ns-as-obj": {
|
|
722
|
+
"description": "ArkTS does not support using namespaces as objects. (10605114)",
|
|
723
|
+
"allOf": [
|
|
724
|
+
{
|
|
725
|
+
"$ref": "#/definitions/ArktsRule"
|
|
726
|
+
}
|
|
727
|
+
],
|
|
728
|
+
"markdownDescription": "ArkTS does not support using namespaces as objects. (10605114)"
|
|
729
|
+
},
|
|
730
|
+
"arkts/no-ns-statements": {
|
|
731
|
+
"description": "ArkTS does not support non-declaration statements in namespaces. (10605116)",
|
|
732
|
+
"allOf": [
|
|
733
|
+
{
|
|
734
|
+
"$ref": "#/definitions/ArktsRule"
|
|
735
|
+
}
|
|
736
|
+
],
|
|
737
|
+
"markdownDescription": "ArkTS does not support non-declaration statements in namespaces. (10605116)"
|
|
738
|
+
},
|
|
739
|
+
"arkts/no-require": {
|
|
740
|
+
"description": "ArkTS does not support require or import assignment. (10605121)",
|
|
741
|
+
"allOf": [
|
|
742
|
+
{
|
|
743
|
+
"$ref": "#/definitions/ArktsRule"
|
|
744
|
+
}
|
|
745
|
+
],
|
|
746
|
+
"markdownDescription": "ArkTS does not support require or import assignment. (10605121)"
|
|
747
|
+
},
|
|
748
|
+
"arkts/no-export-assignment": {
|
|
749
|
+
"description": "ArkTS does not support export = syntax. (10605126)",
|
|
750
|
+
"allOf": [
|
|
751
|
+
{
|
|
752
|
+
"$ref": "#/definitions/ArktsRule"
|
|
753
|
+
}
|
|
754
|
+
],
|
|
755
|
+
"markdownDescription": "ArkTS does not support export = syntax. (10605126)"
|
|
756
|
+
},
|
|
757
|
+
"arkts/no-ambient-decls": {
|
|
758
|
+
"description": "ArkTS does not support ambient module declarations. (10605128)",
|
|
759
|
+
"allOf": [
|
|
760
|
+
{
|
|
761
|
+
"$ref": "#/definitions/ArktsRule"
|
|
762
|
+
}
|
|
763
|
+
],
|
|
764
|
+
"markdownDescription": "ArkTS does not support ambient module declarations. (10605128)"
|
|
765
|
+
},
|
|
766
|
+
"arkts/no-module-wildcards": {
|
|
767
|
+
"description": "ArkTS does not support wildcards in module names. (10605129)",
|
|
768
|
+
"allOf": [
|
|
769
|
+
{
|
|
770
|
+
"$ref": "#/definitions/ArktsRule"
|
|
771
|
+
}
|
|
772
|
+
],
|
|
773
|
+
"markdownDescription": "ArkTS does not support wildcards in module names. (10605129)"
|
|
774
|
+
},
|
|
775
|
+
"arkts/no-umd": {
|
|
776
|
+
"description": "ArkTS does not support UMD declarations. (10605130)",
|
|
777
|
+
"allOf": [
|
|
778
|
+
{
|
|
779
|
+
"$ref": "#/definitions/ArktsRule"
|
|
780
|
+
}
|
|
781
|
+
],
|
|
782
|
+
"markdownDescription": "ArkTS does not support UMD declarations. (10605130)"
|
|
783
|
+
},
|
|
784
|
+
"arkts/no-new-target": {
|
|
785
|
+
"description": "ArkTS does not support new.target. (10605132)",
|
|
786
|
+
"allOf": [
|
|
787
|
+
{
|
|
788
|
+
"$ref": "#/definitions/ArktsRule"
|
|
789
|
+
}
|
|
790
|
+
],
|
|
791
|
+
"markdownDescription": "ArkTS does not support new.target. (10605132)"
|
|
792
|
+
},
|
|
793
|
+
"arkts/no-definite-assignment": {
|
|
794
|
+
"description": "ArkTS does not support definite assignment assertions. (10605134)",
|
|
795
|
+
"allOf": [
|
|
796
|
+
{
|
|
797
|
+
"$ref": "#/definitions/ArktsRule"
|
|
798
|
+
}
|
|
799
|
+
],
|
|
800
|
+
"markdownDescription": "ArkTS does not support definite assignment assertions. (10605134)"
|
|
801
|
+
},
|
|
802
|
+
"arkts/no-prototype-assignment": {
|
|
803
|
+
"description": "ArkTS does not support prototype assignment. (10605136)",
|
|
804
|
+
"allOf": [
|
|
805
|
+
{
|
|
806
|
+
"$ref": "#/definitions/ArktsRule"
|
|
807
|
+
}
|
|
808
|
+
],
|
|
809
|
+
"markdownDescription": "ArkTS does not support prototype assignment. (10605136)"
|
|
810
|
+
},
|
|
811
|
+
"arkts/no-globalthis": {
|
|
812
|
+
"description": "ArkTS does not support globalThis. (10605137)",
|
|
813
|
+
"allOf": [
|
|
814
|
+
{
|
|
815
|
+
"$ref": "#/definitions/ArktsRule"
|
|
816
|
+
}
|
|
817
|
+
],
|
|
818
|
+
"markdownDescription": "ArkTS does not support globalThis. (10605137)"
|
|
819
|
+
},
|
|
820
|
+
"arkts/no-utility-types": {
|
|
821
|
+
"description": "ArkTS supports only Partial, Required, Readonly, and Record utility types. (10605138)",
|
|
822
|
+
"allOf": [
|
|
823
|
+
{
|
|
824
|
+
"$ref": "#/definitions/ArktsRule"
|
|
825
|
+
}
|
|
826
|
+
],
|
|
827
|
+
"markdownDescription": "ArkTS supports only Partial, Required, Readonly, and Record utility types. (10605138)"
|
|
828
|
+
},
|
|
829
|
+
"arkts/no-func-props": {
|
|
830
|
+
"description": "ArkTS does not support declaring properties on functions. (10605139)",
|
|
831
|
+
"allOf": [
|
|
832
|
+
{
|
|
833
|
+
"$ref": "#/definitions/ArktsRule"
|
|
834
|
+
}
|
|
835
|
+
],
|
|
836
|
+
"markdownDescription": "ArkTS does not support declaring properties on functions. (10605139)"
|
|
837
|
+
},
|
|
838
|
+
"arkts/no-func-apply-call": {
|
|
839
|
+
"description": "ArkTS does not support Function.apply or Function.call. (10605152)",
|
|
840
|
+
"allOf": [
|
|
841
|
+
{
|
|
842
|
+
"$ref": "#/definitions/ArktsRule"
|
|
843
|
+
}
|
|
844
|
+
],
|
|
845
|
+
"markdownDescription": "ArkTS does not support Function.apply or Function.call. (10605152)"
|
|
846
|
+
},
|
|
847
|
+
"arkts/no-func-bind": {
|
|
848
|
+
"description": "ArkTS does not support Function.bind. (10605140)",
|
|
849
|
+
"allOf": [
|
|
850
|
+
{
|
|
851
|
+
"$ref": "#/definitions/ArktsRule"
|
|
852
|
+
}
|
|
853
|
+
],
|
|
854
|
+
"markdownDescription": "ArkTS does not support Function.bind. (10605140)"
|
|
855
|
+
},
|
|
856
|
+
"arkts/no-as-const": {
|
|
857
|
+
"description": "ArkTS does not support as const assertions. (10605142)",
|
|
858
|
+
"allOf": [
|
|
859
|
+
{
|
|
860
|
+
"$ref": "#/definitions/ArktsRule"
|
|
861
|
+
}
|
|
862
|
+
],
|
|
863
|
+
"markdownDescription": "ArkTS does not support as const assertions. (10605142)"
|
|
864
|
+
},
|
|
865
|
+
"arkts/no-import-assertions": {
|
|
866
|
+
"description": "ArkTS does not support import assertions. (10605143)",
|
|
867
|
+
"allOf": [
|
|
868
|
+
{
|
|
869
|
+
"$ref": "#/definitions/ArktsRule"
|
|
870
|
+
}
|
|
871
|
+
],
|
|
872
|
+
"markdownDescription": "ArkTS does not support import assertions. (10605143)"
|
|
873
|
+
},
|
|
874
|
+
"arkts/limited-stdlib": {
|
|
875
|
+
"description": "ArkTS restricts dynamic standard library APIs. (10605144)",
|
|
876
|
+
"allOf": [
|
|
877
|
+
{
|
|
878
|
+
"$ref": "#/definitions/ArktsRule"
|
|
879
|
+
}
|
|
880
|
+
],
|
|
881
|
+
"markdownDescription": "ArkTS restricts dynamic standard library APIs. (10605144)"
|
|
882
|
+
},
|
|
883
|
+
"arkts/strict-typing-required": {
|
|
884
|
+
"description": "ArkTS does not allow disabling type checking with @ts-ignore or @ts-nocheck. (10605146)",
|
|
885
|
+
"allOf": [
|
|
886
|
+
{
|
|
887
|
+
"$ref": "#/definitions/ArktsRule"
|
|
888
|
+
}
|
|
889
|
+
],
|
|
890
|
+
"markdownDescription": "ArkTS does not allow disabling type checking with @ts-ignore or @ts-nocheck. (10605146)"
|
|
891
|
+
},
|
|
892
|
+
"arkts/no-ts-deps": {
|
|
893
|
+
"description": "TypeScript and JavaScript files cannot import ETS source files. (10605147)",
|
|
894
|
+
"allOf": [
|
|
895
|
+
{
|
|
896
|
+
"$ref": "#/definitions/ArktsRule"
|
|
897
|
+
}
|
|
898
|
+
],
|
|
899
|
+
"markdownDescription": "TypeScript and JavaScript files cannot import ETS source files. (10605147)"
|
|
900
|
+
},
|
|
901
|
+
"arkts/no-classes-as-obj": {
|
|
902
|
+
"description": "ArkTS does not support using classes as objects.",
|
|
903
|
+
"allOf": [
|
|
904
|
+
{
|
|
905
|
+
"$ref": "#/definitions/ArktsRule"
|
|
906
|
+
}
|
|
907
|
+
],
|
|
908
|
+
"markdownDescription": "ArkTS does not support using classes as objects."
|
|
909
|
+
},
|
|
910
|
+
"arkts/no-misplaced-imports": {
|
|
911
|
+
"description": "ArkTS requires import declarations to appear before other statements.",
|
|
912
|
+
"allOf": [
|
|
913
|
+
{
|
|
914
|
+
"$ref": "#/definitions/ArktsRule"
|
|
915
|
+
}
|
|
916
|
+
],
|
|
917
|
+
"markdownDescription": "ArkTS requires import declarations to appear before other statements."
|
|
918
|
+
},
|
|
919
|
+
"arkts/limited-esobj": {
|
|
920
|
+
"description": "ArkTS restricts ESObject usage.",
|
|
921
|
+
"allOf": [
|
|
922
|
+
{
|
|
923
|
+
"$ref": "#/definitions/ArktsRule"
|
|
924
|
+
}
|
|
925
|
+
],
|
|
926
|
+
"markdownDescription": "ArkTS restricts ESObject usage."
|
|
927
|
+
},
|
|
928
|
+
"arkts/system-api-version": {
|
|
929
|
+
"description": "ArkTS system API usage must be supported by the configured minimum API version.",
|
|
930
|
+
"allOf": [
|
|
931
|
+
{
|
|
932
|
+
"$ref": "#/definitions/ArktsSystemApiVersionRule"
|
|
933
|
+
}
|
|
934
|
+
],
|
|
935
|
+
"markdownDescription": "ArkTS system API usage must be supported by the configured minimum API version."
|
|
936
|
+
}
|
|
937
|
+
},
|
|
938
|
+
"markdownDescription": "See [Oxlint Rules](https://oxc.rs/docs/guide/usage/linter/rules.html)"
|
|
939
|
+
},
|
|
940
|
+
"ExternalPluginEntry": {
|
|
941
|
+
"anyOf": [
|
|
942
|
+
{
|
|
943
|
+
"description": "Path or package name of the plugin",
|
|
944
|
+
"type": "string",
|
|
945
|
+
"markdownDescription": "Path or package name of the plugin"
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
"description": "Plugin with custom name/alias",
|
|
949
|
+
"type": "object",
|
|
950
|
+
"required": ["name", "specifier"],
|
|
951
|
+
"properties": {
|
|
952
|
+
"name": {
|
|
953
|
+
"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.",
|
|
954
|
+
"type": "string",
|
|
955
|
+
"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."
|
|
956
|
+
},
|
|
957
|
+
"specifier": {
|
|
958
|
+
"description": "Path or package name of the plugin",
|
|
959
|
+
"type": "string",
|
|
960
|
+
"markdownDescription": "Path or package name of the plugin"
|
|
961
|
+
}
|
|
962
|
+
},
|
|
963
|
+
"additionalProperties": false,
|
|
964
|
+
"markdownDescription": "Plugin with custom name/alias"
|
|
965
|
+
}
|
|
966
|
+
]
|
|
967
|
+
},
|
|
968
|
+
"GlobSet": {
|
|
969
|
+
"description": "A set of glob patterns.",
|
|
970
|
+
"type": "array",
|
|
971
|
+
"items": {
|
|
972
|
+
"type": "string"
|
|
973
|
+
},
|
|
974
|
+
"markdownDescription": "A set of glob patterns."
|
|
975
|
+
},
|
|
976
|
+
"GlobalValue": {
|
|
977
|
+
"type": "string",
|
|
978
|
+
"enum": ["readonly", "writable", "off"]
|
|
979
|
+
},
|
|
980
|
+
"JSDocPluginSettings": {
|
|
981
|
+
"type": "object",
|
|
982
|
+
"properties": {
|
|
983
|
+
"augmentsExtendsReplacesDocs": {
|
|
984
|
+
"description": "Only for `require-(yields|returns|description|example|param|throws)` rule",
|
|
985
|
+
"default": false,
|
|
986
|
+
"type": "boolean",
|
|
987
|
+
"markdownDescription": "Only for `require-(yields|returns|description|example|param|throws)` rule"
|
|
988
|
+
},
|
|
989
|
+
"exemptDestructuredRootsFromChecks": {
|
|
990
|
+
"description": "Only for `require-param-type` and `require-param-description` rule",
|
|
991
|
+
"default": false,
|
|
992
|
+
"type": "boolean",
|
|
993
|
+
"markdownDescription": "Only for `require-param-type` and `require-param-description` rule"
|
|
994
|
+
},
|
|
995
|
+
"ignoreInternal": {
|
|
996
|
+
"description": "For all rules but NOT apply to `empty-tags` rule",
|
|
997
|
+
"default": false,
|
|
998
|
+
"type": "boolean",
|
|
999
|
+
"markdownDescription": "For all rules but NOT apply to `empty-tags` rule"
|
|
1000
|
+
},
|
|
1001
|
+
"ignorePrivate": {
|
|
1002
|
+
"description": "For all rules but NOT apply to `check-access` and `empty-tags` rule",
|
|
1003
|
+
"default": false,
|
|
1004
|
+
"type": "boolean",
|
|
1005
|
+
"markdownDescription": "For all rules but NOT apply to `check-access` and `empty-tags` rule"
|
|
1006
|
+
},
|
|
1007
|
+
"ignoreReplacesDocs": {
|
|
1008
|
+
"description": "Only for `require-(yields|returns|description|example|param|throws)` rule",
|
|
1009
|
+
"default": true,
|
|
1010
|
+
"type": "boolean",
|
|
1011
|
+
"markdownDescription": "Only for `require-(yields|returns|description|example|param|throws)` rule"
|
|
1012
|
+
},
|
|
1013
|
+
"implementsReplacesDocs": {
|
|
1014
|
+
"description": "Only for `require-(yields|returns|description|example|param|throws)` rule",
|
|
1015
|
+
"default": false,
|
|
1016
|
+
"type": "boolean",
|
|
1017
|
+
"markdownDescription": "Only for `require-(yields|returns|description|example|param|throws)` rule"
|
|
1018
|
+
},
|
|
1019
|
+
"overrideReplacesDocs": {
|
|
1020
|
+
"description": "Only for `require-(yields|returns|description|example|param|throws)` rule",
|
|
1021
|
+
"default": true,
|
|
1022
|
+
"type": "boolean",
|
|
1023
|
+
"markdownDescription": "Only for `require-(yields|returns|description|example|param|throws)` rule"
|
|
1024
|
+
},
|
|
1025
|
+
"tagNamePreference": {
|
|
1026
|
+
"default": {},
|
|
1027
|
+
"type": "object",
|
|
1028
|
+
"additionalProperties": {
|
|
1029
|
+
"$ref": "#/definitions/TagNamePreference"
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
},
|
|
1034
|
+
"JSXA11yPluginSettings": {
|
|
1035
|
+
"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.",
|
|
1036
|
+
"type": "object",
|
|
1037
|
+
"properties": {
|
|
1038
|
+
"attributes": {
|
|
1039
|
+
"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```",
|
|
1040
|
+
"default": {},
|
|
1041
|
+
"type": "object",
|
|
1042
|
+
"additionalProperties": {
|
|
1043
|
+
"type": "array",
|
|
1044
|
+
"items": {
|
|
1045
|
+
"type": "string"
|
|
1046
|
+
}
|
|
1047
|
+
},
|
|
1048
|
+
"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```"
|
|
1049
|
+
},
|
|
1050
|
+
"components": {
|
|
1051
|
+
"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```",
|
|
1052
|
+
"default": {},
|
|
1053
|
+
"type": "object",
|
|
1054
|
+
"additionalProperties": {
|
|
1055
|
+
"type": "string"
|
|
1056
|
+
},
|
|
1057
|
+
"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```"
|
|
1058
|
+
},
|
|
1059
|
+
"polymorphicPropName": {
|
|
1060
|
+
"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`.",
|
|
1061
|
+
"type": "string",
|
|
1062
|
+
"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`."
|
|
1063
|
+
}
|
|
1064
|
+
},
|
|
1065
|
+
"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."
|
|
1066
|
+
},
|
|
1067
|
+
"JestPluginSettings": {
|
|
1068
|
+
"description": "Configure Jest plugin rules.\n\nSee [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest)'s\nconfiguration for a full reference.",
|
|
1069
|
+
"type": "object",
|
|
1070
|
+
"properties": {
|
|
1071
|
+
"version": {
|
|
1072
|
+
"description": "Jest version — accepts a number (`29`) or a semver string (`\"29.1.0\"` or `\"v29.1.0\"`),\nstoring only the major version.\n::: warning\nUsing this config will override the `no-deprecated-functions` config set.\n:::",
|
|
1073
|
+
"default": null,
|
|
1074
|
+
"allOf": [
|
|
1075
|
+
{
|
|
1076
|
+
"$ref": "#/definitions/JestVersionSchema"
|
|
1077
|
+
}
|
|
1078
|
+
],
|
|
1079
|
+
"markdownDescription": "Jest version — accepts a number (`29`) or a semver string (`\"29.1.0\"` or `\"v29.1.0\"`),\nstoring only the major version.\n::: warning\nUsing this config will override the `no-deprecated-functions` config set.\n:::"
|
|
1080
|
+
}
|
|
1081
|
+
},
|
|
1082
|
+
"markdownDescription": "Configure Jest plugin rules.\n\nSee [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest)'s\nconfiguration for a full reference."
|
|
1083
|
+
},
|
|
1084
|
+
"JestVersionSchema": {
|
|
1085
|
+
"anyOf": [
|
|
1086
|
+
{
|
|
1087
|
+
"type": "integer",
|
|
1088
|
+
"format": "uint",
|
|
1089
|
+
"minimum": 0.0
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
"type": "string"
|
|
1093
|
+
}
|
|
1094
|
+
]
|
|
1095
|
+
},
|
|
1096
|
+
"LintPluginOptionsSchema": {
|
|
1097
|
+
"type": "string",
|
|
1098
|
+
"enum": [
|
|
1099
|
+
"eslint",
|
|
1100
|
+
"react",
|
|
1101
|
+
"unicorn",
|
|
1102
|
+
"typescript",
|
|
1103
|
+
"oxc",
|
|
1104
|
+
"import",
|
|
1105
|
+
"jsdoc",
|
|
1106
|
+
"jest",
|
|
1107
|
+
"vitest",
|
|
1108
|
+
"jsx-a11y",
|
|
1109
|
+
"nextjs",
|
|
1110
|
+
"react-perf",
|
|
1111
|
+
"promise",
|
|
1112
|
+
"node",
|
|
1113
|
+
"vue",
|
|
1114
|
+
"arkts"
|
|
1115
|
+
]
|
|
1116
|
+
},
|
|
1117
|
+
"LintPlugins": {
|
|
1118
|
+
"type": "array",
|
|
1119
|
+
"items": {
|
|
1120
|
+
"anyOf": [
|
|
1121
|
+
{
|
|
1122
|
+
"$ref": "#/definitions/LintPluginOptionsSchema"
|
|
1123
|
+
}
|
|
1124
|
+
]
|
|
1125
|
+
}
|
|
1126
|
+
},
|
|
1127
|
+
"NextPluginSettings": {
|
|
1128
|
+
"description": "Configure Next.js plugin rules.",
|
|
1129
|
+
"type": "object",
|
|
1130
|
+
"properties": {
|
|
1131
|
+
"rootDir": {
|
|
1132
|
+
"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```",
|
|
1133
|
+
"default": [],
|
|
1134
|
+
"allOf": [
|
|
1135
|
+
{
|
|
1136
|
+
"$ref": "#/definitions/OneOrMany_for_String"
|
|
1137
|
+
}
|
|
1138
|
+
],
|
|
1139
|
+
"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```"
|
|
1140
|
+
}
|
|
1141
|
+
},
|
|
1142
|
+
"markdownDescription": "Configure Next.js plugin rules."
|
|
1143
|
+
},
|
|
1144
|
+
"OneOrMany_for_String": {
|
|
1145
|
+
"anyOf": [
|
|
1146
|
+
{
|
|
1147
|
+
"type": "string"
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
"type": "array",
|
|
1151
|
+
"items": {
|
|
1152
|
+
"type": "string"
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
]
|
|
1156
|
+
},
|
|
1157
|
+
"OxlintCategories": {
|
|
1158
|
+
"title": "Rule Categories",
|
|
1159
|
+
"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/@ohos-rs/oxk/configuration_schema.json\",\n \"categories\": {\n \"correctness\": \"warn\"\n },\n \"rules\": {\n \"eslint/no-unused-vars\": \"error\"\n }\n}\n```",
|
|
1160
|
+
"examples": [
|
|
1161
|
+
{
|
|
1162
|
+
"correctness": "warn"
|
|
1163
|
+
}
|
|
1164
|
+
],
|
|
1165
|
+
"type": "object",
|
|
1166
|
+
"properties": {
|
|
1167
|
+
"correctness": {
|
|
1168
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
1169
|
+
},
|
|
1170
|
+
"nursery": {
|
|
1171
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
1172
|
+
},
|
|
1173
|
+
"pedantic": {
|
|
1174
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
1175
|
+
},
|
|
1176
|
+
"perf": {
|
|
1177
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
1178
|
+
},
|
|
1179
|
+
"restriction": {
|
|
1180
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
1181
|
+
},
|
|
1182
|
+
"style": {
|
|
1183
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
1184
|
+
},
|
|
1185
|
+
"suspicious": {
|
|
1186
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
1187
|
+
}
|
|
1188
|
+
},
|
|
1189
|
+
"additionalProperties": false,
|
|
1190
|
+
"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/@ohos-rs/oxk/configuration_schema.json\",\n \"categories\": {\n \"correctness\": \"warn\"\n },\n \"rules\": {\n \"eslint/no-unused-vars\": \"error\"\n }\n}\n```"
|
|
1191
|
+
},
|
|
1192
|
+
"OxlintEnv": {
|
|
1193
|
+
"description": "Predefine global variables.\n\nEnvironments specify what global variables are predefined.\nAvailable environments:\n- amd - require() and define() globals.\n- applescript - AppleScript globals.\n- astro - Astro globals.\n- atomtest - Atom test globals.\n- audioworklet - AudioWorklet globals.\n- browser - browser globals.\n- builtin - Latest ECMAScript globals, equivalent to es2026.\n- commonjs - CommonJS globals and scoping.\n- embertest - Ember test globals.\n- es2015 - ECMAScript 2015 globals.\n- es2016 - ECMAScript 2016 globals.\n- es2017 - ECMAScript 2017 globals.\n- es2018 - ECMAScript 2018 globals.\n- es2019 - ECMAScript 2019 globals.\n- es2020 - ECMAScript 2020 globals.\n- es2021 - ECMAScript 2021 globals.\n- es2022 - ECMAScript 2022 globals.\n- es2023 - ECMAScript 2023 globals.\n- es2024 - ECMAScript 2024 globals.\n- es2025 - ECMAScript 2025 globals.\n- es2026 - ECMAScript 2026 globals.\n- es6 - ECMAScript 6 globals except modules.\n- greasemonkey - GreaseMonkey globals.\n- jasmine - Jasmine globals.\n- jest - Jest globals.\n- jquery - jQuery globals.\n- meteor - Meteor globals.\n- mocha - Mocha globals.\n- mongo - MongoDB globals.\n- nashorn - Java 8 Nashorn globals.\n- node - Node.js globals and scoping.\n- phantomjs - PhantomJS globals.\n- prototypejs - Prototype.js globals.\n- protractor - Protractor globals.\n- qunit - QUnit globals.\n- serviceworker - Service Worker globals.\n- shared-node-browser - Node.js and Browser common globals.\n- shelljs - ShellJS globals.\n- svelte - Svelte globals.\n- vitest - Vitest globals.\n- vue - Vue globals.\n- webextensions - WebExtensions globals.\n- worker - Web Workers globals.",
|
|
1194
|
+
"type": "object",
|
|
1195
|
+
"additionalProperties": {
|
|
1196
|
+
"type": "boolean"
|
|
1197
|
+
},
|
|
1198
|
+
"markdownDescription": "Predefine global variables.\n\nEnvironments specify what global variables are predefined.\nAvailable environments:\n- amd - require() and define() globals.\n- applescript - AppleScript globals.\n- astro - Astro globals.\n- atomtest - Atom test globals.\n- audioworklet - AudioWorklet globals.\n- browser - browser globals.\n- builtin - Latest ECMAScript globals, equivalent to es2026.\n- commonjs - CommonJS globals and scoping.\n- embertest - Ember test globals.\n- es2015 - ECMAScript 2015 globals.\n- es2016 - ECMAScript 2016 globals.\n- es2017 - ECMAScript 2017 globals.\n- es2018 - ECMAScript 2018 globals.\n- es2019 - ECMAScript 2019 globals.\n- es2020 - ECMAScript 2020 globals.\n- es2021 - ECMAScript 2021 globals.\n- es2022 - ECMAScript 2022 globals.\n- es2023 - ECMAScript 2023 globals.\n- es2024 - ECMAScript 2024 globals.\n- es2025 - ECMAScript 2025 globals.\n- es2026 - ECMAScript 2026 globals.\n- es6 - ECMAScript 6 globals except modules.\n- greasemonkey - GreaseMonkey globals.\n- jasmine - Jasmine globals.\n- jest - Jest globals.\n- jquery - jQuery globals.\n- meteor - Meteor globals.\n- mocha - Mocha globals.\n- mongo - MongoDB globals.\n- nashorn - Java 8 Nashorn globals.\n- node - Node.js globals and scoping.\n- phantomjs - PhantomJS globals.\n- prototypejs - Prototype.js globals.\n- protractor - Protractor globals.\n- qunit - QUnit globals.\n- serviceworker - Service Worker globals.\n- shared-node-browser - Node.js and Browser common globals.\n- shelljs - ShellJS globals.\n- svelte - Svelte globals.\n- vitest - Vitest globals.\n- vue - Vue globals.\n- webextensions - WebExtensions globals.\n- worker - Web Workers globals."
|
|
1199
|
+
},
|
|
1200
|
+
"OxlintGlobals": {
|
|
1201
|
+
"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/@ohos-rs/oxk/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\"`.",
|
|
1202
|
+
"type": "object",
|
|
1203
|
+
"additionalProperties": {
|
|
1204
|
+
"$ref": "#/definitions/GlobalValue"
|
|
1205
|
+
},
|
|
1206
|
+
"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/@ohos-rs/oxk/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\"`."
|
|
1207
|
+
},
|
|
1208
|
+
"OxlintOptions": {
|
|
1209
|
+
"description": "Options for the linter.",
|
|
1210
|
+
"type": "object",
|
|
1211
|
+
"properties": {
|
|
1212
|
+
"denyWarnings": {
|
|
1213
|
+
"description": "Ensure warnings produce a non-zero exit code.\n\nEquivalent to passing `--deny-warnings` on the CLI.",
|
|
1214
|
+
"type": "boolean",
|
|
1215
|
+
"markdownDescription": "Ensure warnings produce a non-zero exit code.\n\nEquivalent to passing `--deny-warnings` on the CLI."
|
|
1216
|
+
},
|
|
1217
|
+
"maxWarnings": {
|
|
1218
|
+
"description": "Specify a warning threshold. Exits with an error status if warnings exceed this value.\n\nEquivalent to passing `--max-warnings` on the CLI.",
|
|
1219
|
+
"type": "integer",
|
|
1220
|
+
"format": "uint",
|
|
1221
|
+
"minimum": 0.0,
|
|
1222
|
+
"markdownDescription": "Specify a warning threshold. Exits with an error status if warnings exceed this value.\n\nEquivalent to passing `--max-warnings` on the CLI."
|
|
1223
|
+
},
|
|
1224
|
+
"reportUnusedDisableDirectives": {
|
|
1225
|
+
"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.",
|
|
1226
|
+
"allOf": [
|
|
1227
|
+
{
|
|
1228
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
1229
|
+
}
|
|
1230
|
+
],
|
|
1231
|
+
"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."
|
|
1232
|
+
},
|
|
1233
|
+
"respectEslintDisableDirectives": {
|
|
1234
|
+
"description": "Whether oxlint should respect `eslint-disable*` and `eslint-enable*`\ndirectives in addition to its native `oxlint-*` directives.\n\nDefaults to `true`.\nOnly supported in the root configuration file.",
|
|
1235
|
+
"type": "boolean",
|
|
1236
|
+
"markdownDescription": "Whether oxlint should respect `eslint-disable*` and `eslint-enable*`\ndirectives in addition to its native `oxlint-*` directives.\n\nDefaults to `true`.\nOnly supported in the root configuration file."
|
|
1237
|
+
},
|
|
1238
|
+
"typeAware": {
|
|
1239
|
+
"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.",
|
|
1240
|
+
"type": "boolean",
|
|
1241
|
+
"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."
|
|
1242
|
+
},
|
|
1243
|
+
"typeCheck": {
|
|
1244
|
+
"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.",
|
|
1245
|
+
"type": "boolean",
|
|
1246
|
+
"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."
|
|
1247
|
+
}
|
|
1248
|
+
},
|
|
1249
|
+
"additionalProperties": false,
|
|
1250
|
+
"markdownDescription": "Options for the linter."
|
|
1251
|
+
},
|
|
1252
|
+
"OxlintOverride": {
|
|
1253
|
+
"type": "object",
|
|
1254
|
+
"required": ["files"],
|
|
1255
|
+
"properties": {
|
|
1256
|
+
"env": {
|
|
1257
|
+
"description": "Environments enable and disable collections of global variables.",
|
|
1258
|
+
"allOf": [
|
|
1259
|
+
{
|
|
1260
|
+
"$ref": "#/definitions/OxlintEnv"
|
|
1261
|
+
}
|
|
1262
|
+
],
|
|
1263
|
+
"markdownDescription": "Environments enable and disable collections of global variables."
|
|
1264
|
+
},
|
|
1265
|
+
"files": {
|
|
1266
|
+
"description": "A list of glob patterns to override.\n\n## Example\n`[ \"*.test.ts\", \"*.spec.ts\" ]`",
|
|
1267
|
+
"allOf": [
|
|
1268
|
+
{
|
|
1269
|
+
"$ref": "#/definitions/GlobSet"
|
|
1270
|
+
}
|
|
1271
|
+
],
|
|
1272
|
+
"markdownDescription": "A list of glob patterns to override.\n\n## Example\n`[ \"*.test.ts\", \"*.spec.ts\" ]`"
|
|
1273
|
+
},
|
|
1274
|
+
"globals": {
|
|
1275
|
+
"description": "Enabled or disabled specific global variables.",
|
|
1276
|
+
"allOf": [
|
|
1277
|
+
{
|
|
1278
|
+
"$ref": "#/definitions/OxlintGlobals"
|
|
1279
|
+
}
|
|
1280
|
+
],
|
|
1281
|
+
"markdownDescription": "Enabled or disabled specific global variables."
|
|
1282
|
+
},
|
|
1283
|
+
"ignores": {
|
|
1284
|
+
"description": "A list of glob patterns to exclude from this override.\n\nFiles matching these patterns are not globally ignored; this override\nsimply does not apply to them.\n\n## Example\n`[ \"*.generated.ts\", \"fixtures/**\" ]`",
|
|
1285
|
+
"allOf": [
|
|
1286
|
+
{
|
|
1287
|
+
"$ref": "#/definitions/GlobSet"
|
|
1288
|
+
}
|
|
1289
|
+
],
|
|
1290
|
+
"markdownDescription": "A list of glob patterns to exclude from this override.\n\nFiles matching these patterns are not globally ignored; this override\nsimply does not apply to them.\n\n## Example\n`[ \"*.generated.ts\", \"fixtures/**\" ]`"
|
|
1291
|
+
},
|
|
1292
|
+
"jsPlugins": {
|
|
1293
|
+
"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 in alpha and not subject to semver.",
|
|
1294
|
+
"anyOf": [
|
|
1295
|
+
{
|
|
1296
|
+
"type": "null"
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
"type": "array",
|
|
1300
|
+
"items": {
|
|
1301
|
+
"$ref": "#/definitions/ExternalPluginEntry"
|
|
1302
|
+
},
|
|
1303
|
+
"uniqueItems": true
|
|
1304
|
+
}
|
|
1305
|
+
],
|
|
1306
|
+
"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 in alpha and not subject to semver."
|
|
1307
|
+
},
|
|
1308
|
+
"plugins": {
|
|
1309
|
+
"description": "Optionally change what plugins are enabled for this override. When\nomitted, the base config's plugins are used.",
|
|
1310
|
+
"default": null,
|
|
1311
|
+
"allOf": [
|
|
1312
|
+
{
|
|
1313
|
+
"$ref": "#/definitions/LintPlugins"
|
|
1314
|
+
}
|
|
1315
|
+
],
|
|
1316
|
+
"markdownDescription": "Optionally change what plugins are enabled for this override. When\nomitted, the base config's plugins are used."
|
|
1317
|
+
},
|
|
1318
|
+
"rules": {
|
|
1319
|
+
"default": {},
|
|
1320
|
+
"allOf": [
|
|
1321
|
+
{
|
|
1322
|
+
"$ref": "#/definitions/OxlintRules"
|
|
1323
|
+
}
|
|
1324
|
+
]
|
|
1325
|
+
}
|
|
1326
|
+
},
|
|
1327
|
+
"additionalProperties": false
|
|
1328
|
+
},
|
|
1329
|
+
"OxlintOverrides": {
|
|
1330
|
+
"type": "array",
|
|
1331
|
+
"items": {
|
|
1332
|
+
"$ref": "#/definitions/OxlintOverride"
|
|
1333
|
+
}
|
|
1334
|
+
},
|
|
1335
|
+
"OxlintRules": {
|
|
1336
|
+
"$ref": "#/definitions/DummyRuleMap"
|
|
1337
|
+
},
|
|
1338
|
+
"OxlintSettings": {
|
|
1339
|
+
"title": "Oxlint Plugin Settings",
|
|
1340
|
+
"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```",
|
|
1341
|
+
"type": "object",
|
|
1342
|
+
"properties": {
|
|
1343
|
+
"jest": {
|
|
1344
|
+
"default": {
|
|
1345
|
+
"version": null
|
|
1346
|
+
},
|
|
1347
|
+
"allOf": [
|
|
1348
|
+
{
|
|
1349
|
+
"$ref": "#/definitions/JestPluginSettings"
|
|
1350
|
+
}
|
|
1351
|
+
]
|
|
1352
|
+
},
|
|
1353
|
+
"jsdoc": {
|
|
1354
|
+
"default": {
|
|
1355
|
+
"ignorePrivate": false,
|
|
1356
|
+
"ignoreInternal": false,
|
|
1357
|
+
"ignoreReplacesDocs": true,
|
|
1358
|
+
"overrideReplacesDocs": true,
|
|
1359
|
+
"augmentsExtendsReplacesDocs": false,
|
|
1360
|
+
"implementsReplacesDocs": false,
|
|
1361
|
+
"exemptDestructuredRootsFromChecks": false,
|
|
1362
|
+
"tagNamePreference": {}
|
|
1363
|
+
},
|
|
1364
|
+
"allOf": [
|
|
1365
|
+
{
|
|
1366
|
+
"$ref": "#/definitions/JSDocPluginSettings"
|
|
1367
|
+
}
|
|
1368
|
+
]
|
|
1369
|
+
},
|
|
1370
|
+
"jsx-a11y": {
|
|
1371
|
+
"default": {
|
|
1372
|
+
"polymorphicPropName": null,
|
|
1373
|
+
"components": {},
|
|
1374
|
+
"attributes": {}
|
|
1375
|
+
},
|
|
1376
|
+
"allOf": [
|
|
1377
|
+
{
|
|
1378
|
+
"$ref": "#/definitions/JSXA11yPluginSettings"
|
|
1379
|
+
}
|
|
1380
|
+
]
|
|
1381
|
+
},
|
|
1382
|
+
"next": {
|
|
1383
|
+
"default": {
|
|
1384
|
+
"rootDir": []
|
|
1385
|
+
},
|
|
1386
|
+
"allOf": [
|
|
1387
|
+
{
|
|
1388
|
+
"$ref": "#/definitions/NextPluginSettings"
|
|
1389
|
+
}
|
|
1390
|
+
]
|
|
1391
|
+
},
|
|
1392
|
+
"react": {
|
|
1393
|
+
"default": {
|
|
1394
|
+
"formComponents": [],
|
|
1395
|
+
"linkComponents": [],
|
|
1396
|
+
"version": null,
|
|
1397
|
+
"componentWrapperFunctions": []
|
|
1398
|
+
},
|
|
1399
|
+
"allOf": [
|
|
1400
|
+
{
|
|
1401
|
+
"$ref": "#/definitions/ReactPluginSettings"
|
|
1402
|
+
}
|
|
1403
|
+
]
|
|
1404
|
+
},
|
|
1405
|
+
"vitest": {
|
|
1406
|
+
"default": {
|
|
1407
|
+
"typecheck": false
|
|
1408
|
+
},
|
|
1409
|
+
"allOf": [
|
|
1410
|
+
{
|
|
1411
|
+
"$ref": "#/definitions/VitestPluginSettings"
|
|
1412
|
+
}
|
|
1413
|
+
]
|
|
1414
|
+
}
|
|
1415
|
+
},
|
|
1416
|
+
"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```"
|
|
1417
|
+
},
|
|
1418
|
+
"ReactPluginSettings": {
|
|
1419
|
+
"description": "Configure React plugin rules.\n\nDerived from [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react#configuration-legacy-eslintrc-)",
|
|
1420
|
+
"type": "object",
|
|
1421
|
+
"properties": {
|
|
1422
|
+
"componentWrapperFunctions": {
|
|
1423
|
+
"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```",
|
|
1424
|
+
"default": [],
|
|
1425
|
+
"type": "array",
|
|
1426
|
+
"items": {
|
|
1427
|
+
"type": "string"
|
|
1428
|
+
},
|
|
1429
|
+
"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```"
|
|
1430
|
+
},
|
|
1431
|
+
"formComponents": {
|
|
1432
|
+
"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```",
|
|
1433
|
+
"default": [],
|
|
1434
|
+
"type": "array",
|
|
1435
|
+
"items": {
|
|
1436
|
+
"$ref": "#/definitions/CustomComponent"
|
|
1437
|
+
},
|
|
1438
|
+
"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```"
|
|
1439
|
+
},
|
|
1440
|
+
"linkComponents": {
|
|
1441
|
+
"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```",
|
|
1442
|
+
"default": [],
|
|
1443
|
+
"type": "array",
|
|
1444
|
+
"items": {
|
|
1445
|
+
"$ref": "#/definitions/CustomComponent"
|
|
1446
|
+
},
|
|
1447
|
+
"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```"
|
|
1448
|
+
},
|
|
1449
|
+
"version": {
|
|
1450
|
+
"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```",
|
|
1451
|
+
"default": null,
|
|
1452
|
+
"type": "string",
|
|
1453
|
+
"pattern": "^[1-9]\\d*(\\.(0|[1-9]\\d*))?(\\.(0|[1-9]\\d*))?$",
|
|
1454
|
+
"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```"
|
|
1455
|
+
}
|
|
1456
|
+
},
|
|
1457
|
+
"markdownDescription": "Configure React plugin rules.\n\nDerived from [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react#configuration-legacy-eslintrc-)"
|
|
1458
|
+
},
|
|
1459
|
+
"TagNamePreference": {
|
|
1460
|
+
"anyOf": [
|
|
1461
|
+
{
|
|
1462
|
+
"type": "string"
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
"type": "object",
|
|
1466
|
+
"required": ["message", "replacement"],
|
|
1467
|
+
"properties": {
|
|
1468
|
+
"message": {
|
|
1469
|
+
"type": "string"
|
|
1470
|
+
},
|
|
1471
|
+
"replacement": {
|
|
1472
|
+
"type": "string"
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
},
|
|
1476
|
+
{
|
|
1477
|
+
"type": "object",
|
|
1478
|
+
"required": ["message"],
|
|
1479
|
+
"properties": {
|
|
1480
|
+
"message": {
|
|
1481
|
+
"type": "string"
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
},
|
|
1485
|
+
{
|
|
1486
|
+
"type": "boolean"
|
|
1487
|
+
}
|
|
1488
|
+
]
|
|
1489
|
+
},
|
|
1490
|
+
"VitestPluginSettings": {
|
|
1491
|
+
"description": "Configure Vitest plugin rules.\n\nSee [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest)'s\nconfiguration for a full reference.",
|
|
1492
|
+
"type": "object",
|
|
1493
|
+
"properties": {
|
|
1494
|
+
"typecheck": {
|
|
1495
|
+
"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.",
|
|
1496
|
+
"default": false,
|
|
1497
|
+
"type": "boolean",
|
|
1498
|
+
"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."
|
|
1499
|
+
}
|
|
1500
|
+
},
|
|
1501
|
+
"markdownDescription": "Configure Vitest plugin rules.\n\nSee [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest)'s\nconfiguration for a full reference."
|
|
1502
|
+
},
|
|
1503
|
+
"ArktsRule": {
|
|
1504
|
+
"description": "ArkTS lint rule configuration.",
|
|
1505
|
+
"anyOf": [
|
|
1506
|
+
{
|
|
1507
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
1508
|
+
},
|
|
1509
|
+
{
|
|
1510
|
+
"type": "array",
|
|
1511
|
+
"items": [
|
|
1512
|
+
{
|
|
1513
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
1514
|
+
}
|
|
1515
|
+
],
|
|
1516
|
+
"additionalItems": true,
|
|
1517
|
+
"minItems": 1
|
|
1518
|
+
}
|
|
1519
|
+
],
|
|
1520
|
+
"markdownDescription": "ArkTS lint rule configuration."
|
|
1521
|
+
},
|
|
1522
|
+
"ArktsSystemApiVersionRule": {
|
|
1523
|
+
"description": "ArkTS system API version lint rule configuration.",
|
|
1524
|
+
"anyOf": [
|
|
1525
|
+
{
|
|
1526
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
1527
|
+
},
|
|
1528
|
+
{
|
|
1529
|
+
"type": "array",
|
|
1530
|
+
"items": [
|
|
1531
|
+
{
|
|
1532
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
1533
|
+
},
|
|
1534
|
+
{
|
|
1535
|
+
"$ref": "#/definitions/ArktsSystemApiVersionOptions"
|
|
1536
|
+
}
|
|
1537
|
+
],
|
|
1538
|
+
"additionalItems": false,
|
|
1539
|
+
"minItems": 1,
|
|
1540
|
+
"maxItems": 2
|
|
1541
|
+
}
|
|
1542
|
+
],
|
|
1543
|
+
"markdownDescription": "ArkTS system API version lint rule configuration."
|
|
1544
|
+
},
|
|
1545
|
+
"ArktsSystemApiVersionOptions": {
|
|
1546
|
+
"description": "Options for arkts/system-api-version.",
|
|
1547
|
+
"type": "object",
|
|
1548
|
+
"additionalProperties": false,
|
|
1549
|
+
"properties": {
|
|
1550
|
+
"minApiVersion": {
|
|
1551
|
+
"description": "Minimum supported OpenHarmony API version.",
|
|
1552
|
+
"anyOf": [
|
|
1553
|
+
{
|
|
1554
|
+
"type": "integer",
|
|
1555
|
+
"format": "uint32",
|
|
1556
|
+
"minimum": 0.0
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
"type": "string",
|
|
1560
|
+
"pattern": "^[0-9]+$"
|
|
1561
|
+
}
|
|
1562
|
+
],
|
|
1563
|
+
"markdownDescription": "Minimum supported OpenHarmony API version."
|
|
1564
|
+
},
|
|
1565
|
+
"minVersion": {
|
|
1566
|
+
"description": "Alias of minApiVersion.",
|
|
1567
|
+
"anyOf": [
|
|
1568
|
+
{
|
|
1569
|
+
"type": "integer",
|
|
1570
|
+
"format": "uint32",
|
|
1571
|
+
"minimum": 0.0
|
|
1572
|
+
},
|
|
1573
|
+
{
|
|
1574
|
+
"type": "string",
|
|
1575
|
+
"pattern": "^[0-9]+$"
|
|
1576
|
+
}
|
|
1577
|
+
],
|
|
1578
|
+
"markdownDescription": "Alias of minApiVersion."
|
|
1579
|
+
},
|
|
1580
|
+
"apiVersionFile": {
|
|
1581
|
+
"description": "Path to a JSON or JSONC file containing system API version data.",
|
|
1582
|
+
"type": "string",
|
|
1583
|
+
"markdownDescription": "Path to a JSON or JSONC file containing system API version data."
|
|
1584
|
+
},
|
|
1585
|
+
"apisFile": {
|
|
1586
|
+
"description": "Alias of apiVersionFile.",
|
|
1587
|
+
"type": "string",
|
|
1588
|
+
"markdownDescription": "Alias of apiVersionFile."
|
|
1589
|
+
},
|
|
1590
|
+
"apis": {
|
|
1591
|
+
"description": "Inline system API version data keyed by API name.",
|
|
1592
|
+
"$ref": "#/definitions/ArktsSystemApiVersions",
|
|
1593
|
+
"markdownDescription": "Inline system API version data keyed by API name."
|
|
1594
|
+
},
|
|
1595
|
+
"apiVersions": {
|
|
1596
|
+
"description": "Alias of apis.",
|
|
1597
|
+
"$ref": "#/definitions/ArktsSystemApiVersions",
|
|
1598
|
+
"markdownDescription": "Alias of apis."
|
|
1599
|
+
}
|
|
1600
|
+
},
|
|
1601
|
+
"markdownDescription": "Options for arkts/system-api-version."
|
|
1602
|
+
},
|
|
1603
|
+
"ArktsSystemApiVersions": {
|
|
1604
|
+
"type": "object",
|
|
1605
|
+
"additionalProperties": {
|
|
1606
|
+
"$ref": "#/definitions/ArktsSystemApiVersion"
|
|
1607
|
+
}
|
|
1608
|
+
},
|
|
1609
|
+
"ArktsSystemApiVersion": {
|
|
1610
|
+
"description": "System API version, either as a version number or an object with lifecycle fields.",
|
|
1611
|
+
"anyOf": [
|
|
1612
|
+
{
|
|
1613
|
+
"description": "The API version where this API was introduced.",
|
|
1614
|
+
"anyOf": [
|
|
1615
|
+
{
|
|
1616
|
+
"type": "integer",
|
|
1617
|
+
"format": "uint32",
|
|
1618
|
+
"minimum": 0.0
|
|
1619
|
+
},
|
|
1620
|
+
{
|
|
1621
|
+
"type": "string",
|
|
1622
|
+
"pattern": "^[0-9]+$"
|
|
1623
|
+
}
|
|
1624
|
+
],
|
|
1625
|
+
"markdownDescription": "The API version where this API was introduced."
|
|
1626
|
+
},
|
|
1627
|
+
{
|
|
1628
|
+
"type": "object",
|
|
1629
|
+
"additionalProperties": false,
|
|
1630
|
+
"anyOf": [
|
|
1631
|
+
{
|
|
1632
|
+
"required": ["since"]
|
|
1633
|
+
},
|
|
1634
|
+
{
|
|
1635
|
+
"required": ["version"]
|
|
1636
|
+
},
|
|
1637
|
+
{
|
|
1638
|
+
"required": ["apiVersion"]
|
|
1639
|
+
},
|
|
1640
|
+
{
|
|
1641
|
+
"required": ["apiLevel"]
|
|
1642
|
+
}
|
|
1643
|
+
],
|
|
1644
|
+
"properties": {
|
|
1645
|
+
"since": {
|
|
1646
|
+
"description": "The API version where this API was introduced.",
|
|
1647
|
+
"anyOf": [
|
|
1648
|
+
{
|
|
1649
|
+
"type": "integer",
|
|
1650
|
+
"format": "uint32",
|
|
1651
|
+
"minimum": 0.0
|
|
1652
|
+
},
|
|
1653
|
+
{
|
|
1654
|
+
"type": "string",
|
|
1655
|
+
"pattern": "^[0-9]+$"
|
|
1656
|
+
}
|
|
1657
|
+
],
|
|
1658
|
+
"markdownDescription": "The API version where this API was introduced."
|
|
1659
|
+
},
|
|
1660
|
+
"version": {
|
|
1661
|
+
"description": "Alias of since.",
|
|
1662
|
+
"anyOf": [
|
|
1663
|
+
{
|
|
1664
|
+
"type": "integer",
|
|
1665
|
+
"format": "uint32",
|
|
1666
|
+
"minimum": 0.0
|
|
1667
|
+
},
|
|
1668
|
+
{
|
|
1669
|
+
"type": "string",
|
|
1670
|
+
"pattern": "^[0-9]+$"
|
|
1671
|
+
}
|
|
1672
|
+
],
|
|
1673
|
+
"markdownDescription": "Alias of since."
|
|
1674
|
+
},
|
|
1675
|
+
"apiVersion": {
|
|
1676
|
+
"description": "Alias of since.",
|
|
1677
|
+
"anyOf": [
|
|
1678
|
+
{
|
|
1679
|
+
"type": "integer",
|
|
1680
|
+
"format": "uint32",
|
|
1681
|
+
"minimum": 0.0
|
|
1682
|
+
},
|
|
1683
|
+
{
|
|
1684
|
+
"type": "string",
|
|
1685
|
+
"pattern": "^[0-9]+$"
|
|
1686
|
+
}
|
|
1687
|
+
],
|
|
1688
|
+
"markdownDescription": "Alias of since."
|
|
1689
|
+
},
|
|
1690
|
+
"apiLevel": {
|
|
1691
|
+
"description": "Alias of since.",
|
|
1692
|
+
"anyOf": [
|
|
1693
|
+
{
|
|
1694
|
+
"type": "integer",
|
|
1695
|
+
"format": "uint32",
|
|
1696
|
+
"minimum": 0.0
|
|
1697
|
+
},
|
|
1698
|
+
{
|
|
1699
|
+
"type": "string",
|
|
1700
|
+
"pattern": "^[0-9]+$"
|
|
1701
|
+
}
|
|
1702
|
+
],
|
|
1703
|
+
"markdownDescription": "Alias of since."
|
|
1704
|
+
},
|
|
1705
|
+
"removed": {
|
|
1706
|
+
"description": "The API version where this API was removed.",
|
|
1707
|
+
"anyOf": [
|
|
1708
|
+
{
|
|
1709
|
+
"type": "integer",
|
|
1710
|
+
"format": "uint32",
|
|
1711
|
+
"minimum": 0.0
|
|
1712
|
+
},
|
|
1713
|
+
{
|
|
1714
|
+
"type": "string",
|
|
1715
|
+
"pattern": "^[0-9]+$"
|
|
1716
|
+
}
|
|
1717
|
+
],
|
|
1718
|
+
"markdownDescription": "The API version where this API was removed."
|
|
1719
|
+
},
|
|
1720
|
+
"removedVersion": {
|
|
1721
|
+
"description": "Alias of removed.",
|
|
1722
|
+
"anyOf": [
|
|
1723
|
+
{
|
|
1724
|
+
"type": "integer",
|
|
1725
|
+
"format": "uint32",
|
|
1726
|
+
"minimum": 0.0
|
|
1727
|
+
},
|
|
1728
|
+
{
|
|
1729
|
+
"type": "string",
|
|
1730
|
+
"pattern": "^[0-9]+$"
|
|
1731
|
+
}
|
|
1732
|
+
],
|
|
1733
|
+
"markdownDescription": "Alias of removed."
|
|
1734
|
+
},
|
|
1735
|
+
"deleteVersion": {
|
|
1736
|
+
"description": "Alias of removed.",
|
|
1737
|
+
"anyOf": [
|
|
1738
|
+
{
|
|
1739
|
+
"type": "integer",
|
|
1740
|
+
"format": "uint32",
|
|
1741
|
+
"minimum": 0.0
|
|
1742
|
+
},
|
|
1743
|
+
{
|
|
1744
|
+
"type": "string",
|
|
1745
|
+
"pattern": "^[0-9]+$"
|
|
1746
|
+
}
|
|
1747
|
+
],
|
|
1748
|
+
"markdownDescription": "Alias of removed."
|
|
1749
|
+
},
|
|
1750
|
+
"deletedVersion": {
|
|
1751
|
+
"description": "Alias of removed.",
|
|
1752
|
+
"anyOf": [
|
|
1753
|
+
{
|
|
1754
|
+
"type": "integer",
|
|
1755
|
+
"format": "uint32",
|
|
1756
|
+
"minimum": 0.0
|
|
1757
|
+
},
|
|
1758
|
+
{
|
|
1759
|
+
"type": "string",
|
|
1760
|
+
"pattern": "^[0-9]+$"
|
|
1761
|
+
}
|
|
1762
|
+
],
|
|
1763
|
+
"markdownDescription": "Alias of removed."
|
|
1764
|
+
},
|
|
1765
|
+
"removalVersion": {
|
|
1766
|
+
"description": "Alias of removed.",
|
|
1767
|
+
"anyOf": [
|
|
1768
|
+
{
|
|
1769
|
+
"type": "integer",
|
|
1770
|
+
"format": "uint32",
|
|
1771
|
+
"minimum": 0.0
|
|
1772
|
+
},
|
|
1773
|
+
{
|
|
1774
|
+
"type": "string",
|
|
1775
|
+
"pattern": "^[0-9]+$"
|
|
1776
|
+
}
|
|
1777
|
+
],
|
|
1778
|
+
"markdownDescription": "Alias of removed."
|
|
1779
|
+
},
|
|
1780
|
+
"deprecatedSince": {
|
|
1781
|
+
"description": "Alias of removed.",
|
|
1782
|
+
"anyOf": [
|
|
1783
|
+
{
|
|
1784
|
+
"type": "integer",
|
|
1785
|
+
"format": "uint32",
|
|
1786
|
+
"minimum": 0.0
|
|
1787
|
+
},
|
|
1788
|
+
{
|
|
1789
|
+
"type": "string",
|
|
1790
|
+
"pattern": "^[0-9]+$"
|
|
1791
|
+
}
|
|
1792
|
+
],
|
|
1793
|
+
"markdownDescription": "Alias of removed."
|
|
1794
|
+
},
|
|
1795
|
+
"deprecatedVersion": {
|
|
1796
|
+
"description": "Alias of removed.",
|
|
1797
|
+
"anyOf": [
|
|
1798
|
+
{
|
|
1799
|
+
"type": "integer",
|
|
1800
|
+
"format": "uint32",
|
|
1801
|
+
"minimum": 0.0
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
"type": "string",
|
|
1805
|
+
"pattern": "^[0-9]+$"
|
|
1806
|
+
}
|
|
1807
|
+
],
|
|
1808
|
+
"markdownDescription": "Alias of removed."
|
|
1809
|
+
}
|
|
1810
|
+
}
|
|
1811
|
+
}
|
|
1812
|
+
],
|
|
1813
|
+
"markdownDescription": "System API version, either as a version number or an object with lifecycle fields."
|
|
1814
|
+
}
|
|
1815
|
+
},
|
|
1816
|
+
"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/@ohos-rs/oxk/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```"
|
|
1817
|
+
}
|