Skip to content

linter: rule counter does not include override rules #19891

@christopher-buss

Description

@christopher-buss

What version of Oxlint are you using?

1.50.0

What command did you run?

oxlint

What does your .oxlintrc.json (or oxlint.config.ts) config file look like?

{
  "plugins": ["typescript"],
  "categories": {
    "correctness": "off",
    "suspicious": "off",
    "pedantic": "off",
    "perf": "off",
    "restriction": "off",
    "style": "off",
    "nursery": "off"
  },
  "rules": {},
  "overrides": [
    {
      "files": ["**/*.ts"],
      "rules": {
        "typescript/no-non-null-assertion": "error",
        "no-debugger": "error"
      }
    }
  ]
}

What happened?

The summary line reports "0 rules" even though override rules are applied and produce errors.

// demo.ts
const foo = undefined!;
debugger;
export { foo };

Output:

  x typescript-eslint(no-non-null-assertion): Forbidden non-null assertion.
  x eslint(no-debugger): `debugger` statement is not allowed

Found 0 warnings and 2 errors.
Finished in 6ms on 2 files with 0 rules using 32 threads.
                                   ^^^^^^^

The 2 override rules fire correctly and catch errors, but the rule counter only reflects top-level rules. Expected output: 2 rules.

This is misleading when all categories are "off" and rules are enabled exclusively through overrides — the counter reports "0 rules" despite rules actively linting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions