What version of Oxlint are you using?
1.62.0
What command did you run?
pnpm run lint
What does your .oxlintrc.json (or oxlint.config.ts) config file look like?
What happened?
Input (src/App.tsx):
import { useState, useEffect, useCallback } from 'react'
Actual behavior — oxlint reports the same diagnostic 3 times (once per named specifier), all pointing to the full ImportDeclaration span:
× eslint(no-restricted-imports): 'react' import is restricted from being used.
╭─[src/App.tsx:1:1]
1 │ import { useState, useEffect, useCallback } from 'react'
· ────────────────────────────────────────────────────────
2 │ import reactLogo from './assets/react.svg'
╰────
help: Example: React is not allowed to be imported
× eslint(no-restricted-imports): 'react' import is restricted from being used.
╭─[src/App.tsx:1:1]
1 │ import { useState, useEffect, useCallback } from 'react'
· ────────────────────────────────────────────────────────
2 │ import reactLogo from './assets/react.svg'
╰────
help: Example: React is not allowed to be imported
× eslint(no-restricted-imports): 'react' import is restricted from being used.
╭─[src/App.tsx:1:1]
1 │ import { useState, useEffect, useCallback } from 'react'
· ────────────────────────────────────────────────────────
2 │ import reactLogo from './assets/react.svg'
╰────
help: Example: React is not allowed to be imported
(repeated 3x)
I don't get that behavior with that rule using eslint: https://eslint.org/docs/latest/rules/no-restricted-imports
What version of Oxlint are you using?
1.62.0
What command did you run?
pnpm run lint
What does your
.oxlintrc.json(oroxlint.config.ts) config file look like?{ "$schema": "./node_modules/oxlint/configuration_schema.json", "plugins": [ "typescript", "react" ], "categories": { "correctness": "error" }, "env": { "builtin": true }, "ignorePatterns": [ "dist" ], "rules": { "no-restricted-imports": [ "error", { "name": "react", "message": "Example: React is not allowed to be imported" } ] } }What happened?
Input (
src/App.tsx):Actual behavior — oxlint reports the same diagnostic 3 times (once per named specifier), all pointing to the full
ImportDeclarationspan:(repeated 3x)
I don't get that behavior with that rule using eslint: https://eslint.org/docs/latest/rules/no-restricted-imports