Skip to content

Enable @typescript-eslint/consistent-type-imports rule#284

Merged
Mrtenz merged 1 commit intomainfrom
mrtenz/consistent-type-imports
Apr 20, 2023
Merged

Enable @typescript-eslint/consistent-type-imports rule#284
Mrtenz merged 1 commit intomainfrom
mrtenz/consistent-type-imports

Conversation

@Mrtenz
Copy link
Copy Markdown
Member

@Mrtenz Mrtenz commented Apr 20, 2023

Description

This pull request enables the @typescript-eslint/consistent-type-imports rule which helps to enforce the consistency
of writing type import statements across the codebase.

Without this rule, the following is allowed:

import { foo, bar, BazType } from 'package';

With this rule, it will automatically (upon running eslint --fix) turned into:

import type { BazType } from 'package';
import { foo, bar } from 'package';

Changes

  1. Enable the @typescript-eslint/consistent-type-imports rule.

This commit enables the '@typescript-eslint/consistent-type-imports' rule, helping to enforce the consistency of
writing type import statements across the codebase.
@Mrtenz Mrtenz requested a review from a team as a code owner April 20, 2023 17:16
Copy link
Copy Markdown
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Copy Markdown
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice! Makes a lot of sense to me.

@Mrtenz Mrtenz merged commit 49fbaaf into main Apr 20, 2023
@Mrtenz Mrtenz deleted the mrtenz/consistent-type-imports branch April 20, 2023 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants