Skip to content

linter: typescript/no-use-before-define "off" is not respected from oxlintrc #19542

@rajzik

Description

@rajzik

What version of Oxlint are you using?

1.48.0

What command did you run?

oxlint --type-aware --type-check --deny-warnings --report-unused-disable-directives

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

{
  "$schema": "./node_modules/oxlint/configuration_schema.json",
  "plugins": ["typescript"],
  "categories": {
    "correctness": "warn",
    "restriction": "warn"
  },
  "env": {
    "builtin": true
  },
  "rules": {
    "typescript/no-use-before-define": "allow"
  }
}

What happened?

When linting file I get error typescript/no-use-before-define even though it should be disabled.

// Not relevant to the issue
// oxlint-disable-next-line typescript/explicit-function-return-type, typescript/explicit-module-boundary-types
export function someFunction() {
  // 'someOtherFunction' was used before it was defined.
  // help: Move the declaration before any references to it, or remove the reference if it is not 
  someOtherFunction();
}

// oxlint-disable-next-line typescript/explicit-function-return-type, no-empty-function
function someOtherFunction() {}

Reproduction repo: https://github.com/rajzik/oxlint-repro

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