Open
Bug
8447
div>
Description
What version of Oxlint are you using?
1.2.0
What command did you run?
oxlint -c .oxlintrc.json test.ts
What does your .oxlintrc.json
config file look like?
What happened?
Non configured extensions are detected as errors when present instead of being ignored.
With ESLint and eslint-plugin-import
, there are no errors when the import extensions are not present in the config.
Code
import { Something } from './something.hooks';
import SomeComponent from './SomeComponent.vue';
Something
SomeComponent
oxlint
output
❯ oxlint -c .oxlintrc.json test.ts
× eslint-plugin-import(extensions): File extension "vue" should not be included in the import declaration.
╭─[test.ts:2:1]
1 │ import { Something } from './something.hooks';
2 │ import SomeComponent from './SomeComponent.vue';
· ────────────────────────────────────────────────
3 │
╰────
help: Remove the file extension from this import.
× eslint-plugin-import(extensions): File extension "hooks" should not be included in the import declaration.
╭─[test.ts:1:1]
1 │ import { Something } from './something.hooks';
· ──────────────────────────────────────────────
2 │ import SomeComponent from './SomeComponent.vue';
╰────
help: Remove the file extension from this import.
Found 0 warnings and 2 errors.
Finished in 9ms on 1 file with 53 rules using 8 threads.