{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": [
"eslint",
"import",
"oxc",
"promise",
"typescript",
"unicorn",
"vue"
],
"categories": {
"correctness": "error",
"pedantic": "error"
},
"jsPlugins": ["eslint-plugin-perfectionist"],
"ignorePatterns": [
"**/node_modules/**",
"**/dist/**",
"src/shared/types/api-specs.d.ts",
"eslint.config.js"
],
"rules": {
"max-classes-per-file": "off",
"max-dependencies": "off",
"max-depth": "off",
"max-lines": "off",
"max-lines-per-function": "off",
"no-alert": "error",
"no-console": "error",
"no-else-return": "off",
"no-empty": "error",
"no-inline-comments": "off",
"no-magic-numbers": [
"error",
{
"ignore": [-1, 0, 1, 2, 3, 5, 10]
}
],
"no-negated-condition": "off",
"no-restricted-imports": [
"error",
{
"paths": [
{
"allowTypeImports": true,
"message": "Import dayjs from ~shared/config/dayjs-config",
"name": "dayjs"
},
{
"importNames": ["SetupContext"],
"message": "It’s not necessary to manually annotate the setup function’s context.",
"name": "vue"
},
{
"allowTypeImports": true,
"message": "Avoid named imports from lodash (e.g. import { foo } from 'lodash'); use direct imports instead (e.g. import foo from 'lodash/foo').",
"name": "lodash"
}
]
}
],
"no-use-before-define": "error",
"no-warning-comments": "off",
"no-unneeded-ternary": "error",
"no-unused-expressions": ["error", { "allowTernary": true }],
"require-unicode-regexp": "off",
"import/no-named-as-default-member": "off",
"oxc/bad-bitwise-operator": "warn",
"oxc/branches-sharing-code": "warn",
"perfectionist/sort-array-includes": [
"warn",
{
"partitionByComment": true,
"type": "natural"
}
],
"perfectionist/sort-classes": [
"warn",
{
"partitionByComment": true,
"type": "natural"
}
],
"perfectionist/sort-enums": [
"warn",
{
"partitionByComment": true,
"type": "natural"
}
],
"perfectionist/sort-exports": [
"warn",
{
"partitionByComment": true,
"type": "natural"
}
],
"perfectionist/sort-interfaces": [
"warn",
{
"partitionByComment": true,
"type": "natural"
}
],
"perfectionist/sort-intersection-types": [
"warn",
{
"groups": ["named", "object", "function", "unknown", "nullish"],
"order": "asc",
"partitionByComment": true,
"type": "natural"
}
],
"perfectionist/sort-jsx-props": [
"warn",
{
"type": "natural"
}
],
"perfectionist/sort-maps": [
"warn",
{
"partitionByComment": true,
"type": "natural"
}
],
"perfectionist/sort-modules": "off", // conflicts with @typescript-eslint/no-use-before-define
"perfectionist/sort-named-exports": [
"warn",
{ "partitionByComment": true, "type": "natural" }
],
"perfectionist/sort-named-imports": [
"warn",
{
"partitionByComment": true,
"type": "natural"
}
],
"perfectionist/sort-object-types": [
"warn",
{
"partitionByComment": true,
"type": "natural"
}
],
"perfectionist/sort-objects": [
"warn",
{
"type": "unsorted",
"useConfigurationIf": {
"callingFunctionNamePattern": "^defineComponent$"
}
},
{
"partitionByComment": true,
"type": "natural"
}
],
"perfectionist/sort-sets": [
"warn",
{
"partitionByComment": true,
"type": "natural"
}
],
"perfectionist/sort-switch-case": [
"warn",
{
"type": "natural"
}
],
"perfectionist/sort-union-types": [
"warn",
{
"groups": ["named", "object", "function", "unknown", "nullish"],
"order": "asc",
"partitionByComment": true,
"type": "natural"
}
],
"perfectionist/sort-variable-declarations": [
"warn",
{
"partitionByComment": true,
"type": "natural"
}
],
"promise/no-multiple-resolved": "error",
"typescript/ban-ts-comment": "off",
"typescript/consistent-type-imports": "error",
"typescript/dot-notation": "error",
"typescript/no-base-to-string": "error",
"typescript/no-duplicate-type-constituents": "off",
"typescript/no-dynamic-delete": "error",
"typescript/no-empty-interface": "error",
"typescript/no-empty-object-type": "error",
"typescript/no-explicit-any": "error",
"typescript/no-floating-promises": "off",
"typescript/no-inferrable-types": "error",
"typescript/no-misused-promises": "off",
"typescript/no-non-null-assertion": "error",
"typescript/no-unnecessary-boolean-literal-compare": "error",
"typescript/no-unnecessary-condition": "error",
"typescript/no-unnecessary-template-expression": "error",
"typescript/no-unnecessary-type-arguments": "error",
"typescript/no-unnecessary-type-assertion": "error",
"typescript/no-unnecessary-type-constraint": "error",
"typescript/no-unnecessary-type-conversion": "error",
"typescript/no-unnecessary-type-parameters": "error",
"typescript/no-unsafe-argument": "off",
"typescript/no-unsafe-assignment": "off",
"typescript/no-unsafe-call": "off",
"typescript/no-unsafe-enum-comparison": "off",
"typescript/no-unsafe-member-access": "off",
"typescript/no-unsafe-return": "off",
"typescript/no-unsafe-type-assertion": "off",
"typescript/no-unused-vars": "error",
"typescript/non-nullable-type-assertion-style": "off",
"typescript/prefer-find": "error",
"typescript/prefer-for-of": "error",
"typescript/prefer-nullish-coalescing": "warn",
"typescript/prefer-readonly-parameter-types": "off",
"typescript/prefer-reduce-type-parameter": "error",
"typescript/prefer-regexp-exec": "error",
"typescript/promise-function-async": "off",
"typescript/restrict-template-expressions": "off",
"typescript/return-await": "off",
"typescript/strict-boolean-expressions": "off",
"typescript/strict-void-return": "off",
"typescript/switch-exhaustiveness-check": "off",
"unicorn/escape-case": "off",
"unicorn/no-array-callback-reference": "off",
"unicorn/no-hex-escape": "off",
"unicorn/no-negated-condition": "off",
"unicorn/no-useless-undefined": "off",
"unicorn/prefer-add-event-listener": "error",
"unicorn/prefer-at": "off",
"unicorn/prefer-dom-node-dataset": "off",
"unicorn/prefer-number-coercion": "off",
"unicorn/prefer-ternary": "warn",
"vue/no-required-prop-with-default": "error",
"vue/require-default-export": "error"
},
"options": {
"reportUnusedDisableDirectives": "warn",
"typeAware": true
},
"overrides": [
{
"files": ["**/*.test.ts", "**/test/*.ts"],
"rules": {
"no-console": "off",
"no-magic-numbers": "off",
"no-non-null-assertion": "off",
"typescript/no-explicit-any": "off",
"typescript/unbound-method": "off",
"vitest/no-disabled-tests": "error"
}
}
],
"env": {
"builtin": true,
"node": true
}
}
After some file changes I ran oxlint and it panicked with this rather cryptic error:
Luckily I could figure it out when I looked at my diff: I added this line of code as one of changes:
Removing the "FORWARD does not exist on Icon enum" part in the ignore comment fixed the issue.
I can not give you the whole file for proprietary reasons, but I ran some tests.
What version of Oxlint are you using?
1.76.0
What command did you run?
oxlint --max-warnings=0What does your
.oxlintrc.json(oroxlint.config.ts) config file look like?What happened?
After some file changes I ran oxlint and it panicked with this rather cryptic error:
Luckily I could figure it out when I looked at my diff: I added this line of code as one of changes:
Removing the "FORWARD does not exist on Icon enum" part in the ignore comment fixed the issue.
I can not give you the whole file for proprietary reasons, but I ran some tests.
.tsfiles never reproduced the issue, but any time I would copy them into a.vuefile it would (the original file where it happened is a.vuefile as well).// oxlint-disable-next-line typescript/no-explicit-any FORWARD does not exist on Icon enumreportUnusedDisableDirectiveswill stop oxlint from panicking