What version of Oxlint are you using?
1.71.0
What command did you run?
oxlint -c ./oxlint.config.ts
What does your .oxlintrc.json (or oxlint.config.ts) config file look like?
import { defineConfig } from 'oxlint'
export default defineConfig({
rules: {
'no-console': 'error', // Just to see that Oxlint actually runs
'typescript/consistent-type-imports': 'error', // Default `fixStyle`: 'separate-type-imports'
},
})
What happened?
The rule typescript/consistent-type-imports doesn't work at all.
Reproduction:
// Test.tsx
import { type ComponentProps } from 'react'
const Test = (props: ComponentProps<'div'>) => {
console.log('Test component')
return <div {...props}>Test</div>
}
export { Test }
Run oxlint ./Test.tsx -c ./oxlint.config.ts
Linter output:
× eslint(no-console): Unexpected console statement.
╭─[file:///<redacted path>/Test.tsx:4:3]
3 │ const Test = (props: ComponentProps<'div'>) => {
4 │ console.log('Test component')
· ───────────
5 │
╰────
help: Delete this console statement.
Found 0 warnings and 1 error.
Finished in 32ms on 1 file with 97 rules using 10 threads.
Additional expected output (or auto-fixed when run with --fix):
(I don't know what the error would look like, so this is a made-up error message)
import { type ComponentProps } from 'react'
^^^^
Add the `type` keyword after `import`:
import type { ComponentProps } from 'react'
What version of Oxlint are you using?
1.71.0
What command did you run?
oxlint -c ./oxlint.config.tsWhat does your
.oxlintrc.json(oroxlint.config.ts) config file look like?What happened?
The rule
typescript/consistent-type-importsdoesn't work at all.Reproduction:
Run
oxlint ./Test.tsx -c ./oxlint.config.tsLinter output:
Additional expected output (or auto-fixed when run with
--fix):(I don't know what the error would look like, so this is a made-up error message)