What version of Oxlint are you using?
1.62.0
What command did you run?
oxlint --fix
What does your .oxlintrc.json (or oxlint.config.ts) config file look like?
What happened?
The mismatch happens at this rule: "vue/define-props-destructuring": ["warn", { "destructure": "only-when-assigned" }].
In the documentation website of eslint-plugin-vue, this section clearly shows that only-when-assigned is a valid option. However, setting this option in Oxlint and try starting linting will yield the error below:
Failed to parse oxlint configuration file.
× Invalid configuration for rule `vue/define-props-destructuring`:
│ unknown variant `only-when-assigned`, expected `always` or `never`
│ received config: `{ "destructure": "only-when-assigned" }`
The page in Oxlint documentation also has the mismatch between real config.
This line in tasks/lint_rules/package.json shows that eslint-plugin-vue is in latest version. So this is probably not an outdated deps issue. I suppose this is a bug that makes Oxlint unable to use the correct built-in plugin config.
What version of Oxlint are you using?
1.62.0
What command did you run?
oxlint --fixWhat does your
.oxlintrc.json(oroxlint.config.ts) config file look like?{ "$schema": "./node_modules/oxlint/configuration_schema.json", "plugins": ["unicorn", "typescript", "oxc", "import", "vue"], "categories": { "correctness": "warn", "perf": "warn", "nursery": "warn", "suspicious": "warn", "style": "warn" }, "rules": { "typescript/prefer-readonly-parameter-types": "off", "unicorn/no-array-sort": "off", "unicorn/no-array-reverse": "off", "typescript/no-unnecessary-condition": "off", "typescript/consistent-return": "off", "eslint/func-style": "off", "eslint/max-statements": "off", "import/no-named-export": "off", "curly": ["error", "multi"], "eslint/no-ternary": "off", "eslint/no-nested-ternary": "off", "unicorn/no-nested-ternary": "off", "typescript/array-type": ["warn", { "default": "generic" }], "eslint/id-length": "off", "eslint/init-declarations": "off", "eslint/no-magic-numbers": "off", "import/exports-last": "off", "import/group-exports": "off", "eslint/no-continue": "off", "typescript/no-unsafe-type-assertion": "off", "typescript/consistent-type-definitions": ["warn", "type"], "typescript/parameter-properties": ["warn", { "prefer": "parameter-property" }], "typescript/unbound-method": "off", "eslint/prefer-destructuring": [ "warn", { "AssignmentExpression": { "array": false, "object": false } } ], "unicorn/prefer-global-this": "off", "eslint/no-new": "off", "eslint/sort-imports": "off", // disable temporarily since it is glitchy "eslint/no-duplicate-imports": ["warn", { "allowSeparateTypeImports": true }], "eslint/new-cap": "off", "typescript/consistent-type-imports": "off", "react/jsx-max-depth": "off", "react/react-in-jsx-scope": "off", "unicorn/no-await-expression-member": "off", "eslint/no-await-in-loop": "off", "eslint/max-params": "off", "unicorn/filename-case": [ "warn", { "cases": { "kebabCase": true, "camelCase": false, "snakeCase": false, "pascalCase": true }, "ignore": "zh-Hans.ts" } ], "unicorn/consistent-function-scoping": "off", "react/jsx-props-no-spreading": "off", "import/no-unassigned-import": [ "warn", { "allow": ["**/*.css", "**/*.scss", "**/*.less", "**/*.d.ts"] } ], "unicorn/number-literal-case": "off", "eslint/no-multi-assign": "off", "jest/prefer-expect-assertions": "off", "vitest/prefer-expect-assertions": "off", "vitest/no-importing-vitest-globals": "off", "vitest/prefer-import-in-mock": "off", "jest/no-untyped-mock-factory": "off", "vitest/require-mock-type-parameters": "off", "vitest/prefer-to-be-truthy": "off", "vitest/prefer-to-be-falsy": "off", "vitest/prefer-describe-function-title": "off", "jest/max-expects": "off", "vitest/max-expects": "off", "jest/prefer-ending-with-an-expect": "off", "jest/no-conditional-expect": "off", "vitest/no-conditional-expect": "off", "jest/require-hook": "off", "vitest/prefer-called-once": "off", "eslint/no-underscore-dangle": "off", "vue/define-props-destructuring": ["warn", { "destructure": "only-when-assigned" }], }, "env": { "builtin": true }, "globals": { "window": "readonly", "Node": "readonly", "process": "readonly", "console": "readonly", "TextEncoder": "readonly", "Blob": "readonly", "URL": "readonly", "Response": "readonly", "HTMLElement": "readonly", "DOMParser": "readonly", "btoa": "readonly", "atob": "readonly", "navigator": "readonly", "structuredClone": "readonly", "crypto": "readonly", "document": "readonly", "defineProps": "readonly", "defineEmits": "readonly", "setTimeout": "readonly", "clearTimeout": "readonly", "requestAnimationFrame": "readonly", "location": "readonly", "HTMLButtonElement": "readonly", "withDefaults": "readonly", "defineOptions": "readonly", "defineExpose": "readonly", "fetch": "readonly", "getComputedStyle": "readonly", "ClipboardItem": "readonly", "Event": "readonly", "HTMLInputElement": "readonly", "setInterval": "readonly", "clearInterval": "readonly", "cancelAnimationFrame": "readonly", "requestIdleCallback": "readonly", "cancelIdleCallback": "readonly", "HTMLAnchorElement": "readonly", "KeyboardEvent": "readonly", "IntersectionObserver": "readonly", "ResizeObserver": "readonly", "defineSlots": "readonly" }, "ignorePatterns": ["**/node_modules/**", "**/dist/**"] }What happened?
The mismatch happens at this rule:
"vue/define-props-destructuring": ["warn", { "destructure": "only-when-assigned" }].In the documentation website of
eslint-plugin-vue, this section clearly shows thatonly-when-assignedis a valid option. However, setting this option in Oxlint and try starting linting will yield the error below:Failed to parse oxlint configuration file. × Invalid configuration for rule `vue/define-props-destructuring`: │ unknown variant `only-when-assigned`, expected `always` or `never` │ received config: `{ "destructure": "only-when-assigned" }`The page in Oxlint documentation also has the mismatch between real config.
This line in
tasks/lint_rules/package.jsonshows thateslint-plugin-vueis in latest version. So this is probably not an outdated deps issue. I suppose this is a bug that makes Oxlint unable to use the correct built-in plugin config.