oxc icon indicating copy to clipboard operation
oxc copied to clipboard

linter: `eslint/no-undef` fails on ts type `NodeListOf`

Open Sysix opened this issue 3 months ago • 1 comments

What version of Oxlint are you using?

0.10.3

What command did you run?

oxlint -c .oxlint.json

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

{
  "env": {
    "browser": true
  },
  "categories": {
    "correctness": "off"
  },
  "rules": {
    "no-undef": "error"
  }
}

What happened?

It does not know about this specific types:

  × eslint(no-undef): 'NodeListOf' is not defined.
    ╭─[src/index.ts:11:12]
 10 │ 
 11 │ const xyz: NodeListOf<HTMLElement> = document.querySelectorAll('.xxxx');
    ·            ──────────
 12 │ 
    ╰────

Others lines like: const abc: Element | null = document.querySelector('.xxx'); are working

Sysix avatar Oct 29 '24 18:10 Sysix