Skip to content

linter: id-length - false positive on in generics #23801

Description

@DetachHead

What version of Oxlint are you using?

1.71.0

What command did you run?

No response

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

{
  "categories": {
    "correctness": "off"
  },
  "plugins": ["react"],
  "rules": {
    "id-length": ["warn", { "checkGeneric": false }]
  }
}

What happened?

type Foo<T> = { // no error (correct)
  [K in keyof T]: unknown; // error on K (false positive)
};

Metadata

Metadata

Assignees

Labels

Type

Fields

Priority

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions