You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: crates/oxc_linter/src/snapshots/schema_json.snap
+10-1
Original file line number
Diff line number
Diff line change
@@ -241,16 +241,19 @@ snapshot_kind: text
241
241
}
242
242
},
243
243
"JSXA11yPluginSettings": {
244
+
"description": "Configure JSX A11y plugin rules.\n\nSee [eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y#configurations)'s configuration for a full reference.",
244
245
"type": "object",
245
246
"properties": {
246
247
"components": {
248
+
"description": "To have your custom components be checked as DOM elements, you can provide a mapping of your component names to the DOM element name.\n\n## Example\n\n```json { \"settings\": { \"jsx-a11y\": { \"components\": { \"Link\": \"a\", \"IconButton\": \"button\" } } } } ```",
247
249
"default": {},
248
250
"type": "object",
249
251
"additionalProperties": {
250
252
"type": "string"
251
253
}
252
254
},
253
255
"polymorphicPropName": {
256
+
"description": "An optional setting that define the prop your code uses to create polymorphic components. This setting will be used to determine the element type in rules that require semantic context.\n\nFor example, if you set the `polymorphicPropName` to `as`, then this element:\n\n```jsx <Box as=\"h3\">Hello</Box> ```\n\nWill be treated as an `h3`. If not set, this component will be treated as a `Box`.",
254
257
"type": [
255
258
"string",
256
259
"null"
@@ -265,9 +268,11 @@ snapshot_kind: text
265
268
}
266
269
},
267
270
"NextPluginSettings": {
271
+
"description": "Configure Next.js plugin rules.",
268
272
"type": "object",
269
273
"properties": {
270
274
"rootDir": {
275
+
"description": "The root directory of the Next.js project.\n\nThis is particularly useful when you have a monorepo and your Next.js project is in a subfolder.\n\n## Example\n\n```json { \"settings\": { \"next\": { \"rootDir\": \"apps/dashboard/\" } } } ```",
271
276
"default": [],
272
277
"allOf": [
273
278
{
@@ -383,7 +388,8 @@ snapshot_kind: text
383
388
"$ref": "#/definitions/DummyRuleMap"
384
389
},
385
390
"OxlintSettings": {
386
-
"description": "Shared settings for plugins",
391
+
"title": "Oxlint Plugin Settings",
392
+
"description": "Configure the behavior of linter plugins.\n\n## Example\n\nHere's an example if you're using Next.js in a monorepo:\n\n```json { \"settings\": { \"next\": { \"rootDir\": \"apps/dashboard/\" }, \"react\": { \"linkComponents\": [ { \"name\": \"Link\", \"linkAttribute\": \"to\" } ] }, \"jsx-a11y\": { \"components\": { \"Link\": \"a\", \"Button\": \"button\" } } } } ```",
387
393
"type": "object",
388
394
"properties": {
389
395
"jsdoc": {
@@ -438,16 +444,19 @@ snapshot_kind: text
438
444
}
439
445
},
440
446
"ReactPluginSettings": {
447
+
"description": "Configure React plugin rules.\n\nDerived from [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react#configuration-legacy-eslintrc-)",
441
448
"type": "object",
442
449
"properties": {
443
450
"formComponents": {
451
+
"description": "Components used as alternatives to `<form>` for forms, such as `<Formik>`.\n\n## Example\n\n```jsonc { \"settings\": { \"react\": { \"formComponents\": [ \"CustomForm\", // OtherForm is considered a form component and has an endpoint attribute { \"name\": \"OtherForm\", \"formAttribute\": \"endpoint\" }, // allows specifying multiple properties if necessary { \"name\": \"Form\", \"formAttribute\": [\"registerEndpoint\", \"loginEndpoint\"] } ] } } } ```",
444
452
"default": [],
445
453
"type": "array",
446
454
"items": {
447
455
"$ref": "#/definitions/CustomComponent"
448
456
}
449
457
},
450
458
"linkComponents": {
459
+
"description": "Components used as alternatives to `<a>` for linking, such as `<Link>`.\n\n## Example\n\n```jsonc { \"settings\": { \"react\": { \"linkComponents\": [ \"HyperLink\", // Use `linkAttribute` for components that use a different prop name // than `href`. { \"name\": \"MyLink\", \"linkAttribute\": \"to\" }, // allows specifying multiple properties if necessary { \"name\": \"Link\", \"linkAttribute\": [\"to\", \"href\"] } ] } } } ```",
Copy file name to clipboardexpand all lines: npm/oxlint/configuration_schema.json
+10-1
Original file line number
Diff line number
Diff line change
@@ -236,16 +236,19 @@
236
236
}
237
237
},
238
238
"JSXA11yPluginSettings": {
239
+
"description": "Configure JSX A11y plugin rules.\n\nSee [eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y#configurations)'s configuration for a full reference.",
239
240
"type": "object",
240
241
"properties": {
241
242
"components": {
243
+
"description": "To have your custom components be checked as DOM elements, you can provide a mapping of your component names to the DOM element name.\n\n## Example\n\n```json { \"settings\": { \"jsx-a11y\": { \"components\": { \"Link\": \"a\", \"IconButton\": \"button\" } } } } ```",
242
244
"default": {},
243
245
"type": "object",
244
246
"additionalProperties": {
245
247
"type": "string"
246
248
}
247
249
},
248
250
"polymorphicPropName": {
251
+
"description": "An optional setting that define the prop your code uses to create polymorphic components. This setting will be used to determine the element type in rules that require semantic context.\n\nFor example, if you set the `polymorphicPropName` to `as`, then this element:\n\n```jsx <Box as=\"h3\">Hello</Box> ```\n\nWill be treated as an `h3`. If not set, this component will be treated as a `Box`.",
249
252
"type": [
250
253
"string",
251
254
"null"
@@ -260,9 +263,11 @@
260
263
}
261
264
},
262
265
"NextPluginSettings": {
266
+
"description": "Configure Next.js plugin rules.",
263
267
"type": "object",
264
268
"properties": {
265
269
"rootDir": {
270
+
"description": "The root directory of the Next.js project.\n\nThis is particularly useful when you have a monorepo and your Next.js project is in a subfolder.\n\n## Example\n\n```json { \"settings\": { \"next\": { \"rootDir\": \"apps/dashboard/\" } } } ```",
266
271
"default": [],
267
272
"allOf": [
268
273
{
@@ -378,7 +383,8 @@
378
383
"$ref": "#/definitions/DummyRuleMap"
379
384
},
380
385
"OxlintSettings": {
381
-
"description": "Shared settings for plugins",
386
+
"title": "Oxlint Plugin Settings",
387
+
"description": "Configure the behavior of linter plugins.\n\n## Example\n\nHere's an example if you're using Next.js in a monorepo:\n\n```json { \"settings\": { \"next\": { \"rootDir\": \"apps/dashboard/\" }, \"react\": { \"linkComponents\": [ { \"name\": \"Link\", \"linkAttribute\": \"to\" } ] }, \"jsx-a11y\": { \"components\": { \"Link\": \"a\", \"Button\": \"button\" } } } } ```",
382
388
"type": "object",
383
389
"properties": {
384
390
"jsdoc": {
@@ -433,16 +439,19 @@
433
439
}
434
440
},
435
441
"ReactPluginSettings": {
442
+
"description": "Configure React plugin rules.\n\nDerived from [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react#configuration-legacy-eslintrc-)",
436
443
"type": "object",
437
444
"properties": {
438
445
"formComponents": {
446
+
"description": "Components used as alternatives to `<form>` for forms, such as `<Formik>`.\n\n## Example\n\n```jsonc { \"settings\": { \"react\": { \"formComponents\": [ \"CustomForm\", // OtherForm is considered a form component and has an endpoint attribute { \"name\": \"OtherForm\", \"formAttribute\": \"endpoint\" }, // allows specifying multiple properties if necessary { \"name\": \"Form\", \"formAttribute\": [\"registerEndpoint\", \"loginEndpoint\"] } ] } } } ```",
439
447
"default": [],
440
448
"type": "array",
441
449
"items": {
442
450
"$ref": "#/definitions/CustomComponent"
443
451
}
444
452
},
445
453
"linkComponents": {
454
+
"description": "Components used as alternatives to `<a>` for linking, such as `<Link>`.\n\n## Example\n\n```jsonc { \"settings\": { \"react\": { \"linkComponents\": [ \"HyperLink\", // Use `linkAttribute` for components that use a different prop name // than `href`. { \"name\": \"MyLink\", \"linkAttribute\": \"to\" }, // allows specifying multiple properties if necessary { \"name\": \"Link\", \"linkAttribute\": [\"to\", \"href\"] } ] } } } ```",
0 commit comments