Open in-in opened 5 months ago
Yes, the plugin identifies type imports as type imports, and imports where types have been imported as normal imports.
// external-type group
import type { Configuration } from 'webpack'
// external group
import { type Configuration } from 'webpack'
So it's not a bug, it's a feature, right?
Yep. At least that's the idea. Do you think it should work differently?
I'm really surprised that importing a type is treated like importing a module, but I don't have a strong opinion on that.
Describe the bug
The plugin does not respect inline type qualifiers
Code example
ESLint version
8.55.0
ESLint Plugin Perfectionist version
2.5.0
Additional comments
https://typescript-eslint.io/blog/consistent-type-imports-and-exports-why-and-how/
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-5.html#type-modifiers-on-import-names
Validations