Skip to content

[consistent-type-imports] Support inline type imports #4264

@chbdetta

Description

@chbdetta
  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have read the FAQ and my problem is not listed.

Repro

{
  "rules": {
    "@typescript-eslint/consistent-type-imports": ["2", {"prefer": "type-imports"}]
  }
}
import {type ReactElement, Component} from 'react'; // eslint-error

Expected Result

import {type ReactElement, Component} from 'react'; // this should not be an error

Additional Info

Versions

package version
@typescript-eslint/eslint-plugin 5.5.0
@typescript-eslint/parser 5.5.0
TypeScript 4.5.2
ESLint 8.3.0
node 16.13.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: eslint-pluginIssues related to @typescript-eslint/eslint-pluginworking as intendedIssues that are closed as they are working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions