{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Oxlintrc",
"description": "Oxlint Configuration File\n\nThis configuration is aligned with ESLint v8's configuration schema (`eslintrc.json`).\n\nUsage: `oxlint -c oxlintrc.json --import-plugin`\n\n::: danger NOTE\n\nOnly the `.json` format is supported. You can use comments in configuration files.\n\n:::\n\nExample\n\n`.oxlintrc.json`\n\n```json { \"$schema\": \"./node_modules/oxlint/configuration_schema.json\", \"plugins\": [\"import\", \"typescript\", \"unicorn\"], \"env\": { \"browser\": true }, \"globals\": { \"foo\": \"readonly\" }, \"settings\": { }, \"rules\": { \"eqeqeq\": \"warn\", \"import/no-cycle\": \"error\" }, \"overrides\": [ { \"files\": [\"*.test.ts\", \"*.spec.ts\"], \"rules\": { \"@typescript-eslint/no-explicit-any\": \"off\" } } ] } ```",
"type": "object",
"properties": {
"categories": {
"default": {},
"allOf": [
{
"$ref": "#/definitions/OxlintCategories"
}
]
},
"env": {
"description": "Environments enable and disable collections of global variables.",
"default": {
"builtin": true
},
"allOf": [
{
"$ref": "#/definitions/OxlintEnv"
}
]
},
"globals": {
"description": "Enabled or disabled specific global variables.",
"default": {},
"allOf": [
{
"$ref": "#/definitions/OxlintGlobals"
}
]
},
"ignorePatterns": {
"description": "Globs to ignore during linting. These are resolved from the configuration file path.",
"default": [],
"type": "array",
"items": {
"type": "string"
}
},
"overrides": {
"description": "Add, remove, or otherwise reconfigure rules for specific files or groups of files.",
"allOf": [
{
"$ref": "#/definitions/OxlintOverrides"
}
]
},
"plugins": {
"default": [
"react",
"unicorn",
"typescript",
"oxc"
],
"allOf": [
{
"$ref": "#/definitions/LintPlugins"
}
]
},
"rules": {
"description": "Example\n\n`.oxlintrc.json`\n\n```json { \"$schema\": \"./node_modules/oxlint/configuration_schema.json\", \"rules\": { \"eqeqeq\": \"warn\", \"import/no-cycle\": \"error\", \"prefer-const\": [\"error\", { \"ignoreReadBeforeAssign\": true }] } } ```\n\nSee [Oxlint Rules](https://oxc.rs/docs/guide/usage/linter/rules.html) for the list of rules.",
"default": {},
"allOf": [
{
"$ref": "#/definitions/OxlintRules"
}
]
},
"settings": {
"default": {
"jsx-a11y": {
"polymorphicPropName": null,
"components": {}
},
"next": {
"rootDir": []
},
"react": {
"formComponents": [],
"linkComponents": []
},
"jsdoc": {
"ignorePrivate": false,
"ignoreInternal": false,
"ignoreReplacesDocs": true,
"overrideReplacesDocs": true,
"augmentsExtendsReplacesDocs": false,
"implementsReplacesDocs": false,
"exemptDestructuredRootsFromChecks": false,
"tagNamePreference": {}
}
},
"allOf": [
{
"$ref": "#/definitions/OxlintSettings"
}
]
}
},
"definitions": {
"AllowWarnDeny": {
"oneOf": [
{
"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).",
"type": "string",
"enum": [
"allow",
"off",
"warn",
"error",
"deny"
]
},
{
"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).",
"type": "integer",
"format": "uint32",
"maximum": 2.0,
"minimum": 0.0
}
]
},
"CustomComponent": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"required": [
"attribute",
"name"
],
"properties": {
"attribute": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
{
"type": "object",
"required": [
"attributes",
"name"
],
"properties": {
"attributes": {
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"type": "string"
}
}
}
]
},
"DummyRule": {
"anyOf": [
{
"$ref": "#/definitions/AllowWarnDeny"
},
{
"type": "array",
"items": true
}
]
},
"DummyRuleMap": {
"description": "See [Oxlint Rules](https://oxc.rs/docs/guide/usage/linter/rules.html)",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/DummyRule"
}
},
"GlobSet": {
"type": "array",
"items": {
"type": "string"
}
},
"GlobalValue": {
"type": "string",
"enum": [
"readonly",
"writeable",
"off"
]
},
"JSDocPluginSettings": {
"type": "object",
"properties": {
"augmentsExtendsReplacesDocs": {
"description": "Only for `require-(yields|returns|description|example|param|throws)` rule",
"default": false,
"type": "boolean"
},
"exemptDestructuredRootsFromChecks": {
"description": "Only for `require-param-type` and `require-param-description` rule",
"default": false,
"type": "boolean"
},
"ignoreInternal": {
"description": "For all rules but NOT apply to `empty-tags` rule",
"default": false,
"type": "boolean"
},
"ignorePrivate": {
"description": "For all rules but NOT apply to `check-access` and `empty-tags` rule",
"default": false,
"type": "boolean"
},
"ignoreReplacesDocs": {
"description": "Only for `require-(yields|returns|description|example|param|throws)` rule",
"default": true,
"type": "boolean"
},
"implementsReplacesDocs": {
"description": "Only for `require-(yields|returns|description|example|param|throws)` rule",
"default": false,
"type": "boolean"
},
"overrideReplacesDocs": {
"description": "Only for `require-(yields|returns|description|example|param|throws)` rule",
"default": true,
"type": "boolean"
},
"tagNamePreference": {
"default": {},
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/TagNamePreference"
}
}
}
},
"JSXA11yPluginSettings": {
"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.",
"type": "object",
"properties": {
"components": {
"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\nExample:\n\n```json { \"settings\": { \"jsx-a11y\": { \"components\": { \"Link\": \"a\", \"IconButton\": \"button\" } } } } ```",
"default": {},
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"polymorphicPropName": {
"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