Skip to content

linter: no-redeclare triggers for function overloads #10396

@Miodec

Description

@Miodec

What version of Oxlint are you using?

0.16.6

What command did you run?

cli and vsc extension

What does your .oxlintrc.json config file look like?

{
  "ignorePatterns": ["node_modules", "dist", "coverage", "build"],
  "categories": {
    "correctness": "error",
    "suspicious": "error",
    "perf": "error"
  },
  "plugins": ["typescript", "unicorn", "oxc", "import", "node", "promise"],
  "rules": {
    "no-unused-vars": [
      "error",
      {
        "argsIgnorePattern": "^(_|e|event)",
        "caughtErrorsIgnorePattern": "^(_|e|error)",
        "varsIgnorePattern": "^_"
      }
    ],
    "no-await-in-loop": "allow",
    "consistent-function-scoping": "off",
    "prefer-add-event-listener": "off",
    "no-unsafe-optional-chaining": "off",
    "no-new": "off",
    "no-new-array": "off",
    "no-useless-spread": "off",
    "no-unneeded-ternary": "off",
    "no-async-endpoint-handlers": "off",
    "no-this-alias": "off",
    "no-var": "error",

    "no-non-null-assertion": "error",
    "no-non-null-asserted-nullish-coalescing": "error",
    "no-explicit-any": "error",
    "no-empty-object-type": "error",
    "explicit-function-return-type": [
      "error",
      {
        "allowExpressions": true
      }
    ],
    "no-unused-expressions": [
      "error",
      {
        "allowTernary": true
      }
    ],
    "no-unsafe-function-type": "error",
    "prefer-for-of": "error",
    "consistent-type-definitions": ["error", "type"],
    "no-var-requires": "error",
    "no-named-as-default": "error",
    "no-named-as-default-member": "error",
    "no-array-constructor": "error",
    "no-dynamic-delete": "error",
    "no-extraneous-class": "error",
    "no-require-imports": "error",
    "no-empty-function": "error",
    "no-redeclare": "error",
    "no-empty": [
      "error",
      {
        "allowEmptyCatch": true
      }
    ],
    "no-self-compare": "error",
    "no-throw-literal": "error",
    "no-constant-condition": "error",
    "no-constant-binary-expression": "error",
    "no-unnecessary-type-constraint": "error",
    "no-useless-constructor": "error",
    "prefer-literal-enum-member": "error",
    "prefer-namespace-keyword": "error",
    "prefer-rest-params": "error",
    "prefer-spread": "error",
    "no-duplicates": "error",
    "no-case-declarations": "error",
    "no-fallthrough": "error",
    "no-inner-declarations": "error",
    "no-prototype-builtins": "error",
    "no-regex-spaces": "error",

    "todo-lowerthis": "off",
    "max-depth": [
      "error",
      {
        "max": 9
      }
    ],

    "todo": "off",
    "ban-ts-comment": "off",
    "no-array-for-each": "off",
    "eqeqeq": "off",
    "prefer-ts-expect-error": "off",

    "consider": "off",
    "no-cycle": "off",
    "no-nested-ternary": "off"
  }
}

What happened?

I assume this is because oxlint doesn't fully support typescript rules yet, but i thought i would report this in case there is some temporary hack/workaround that could be implemented here (or if i should just do a disable-next-line for now)

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions