Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Apr 20, 2023

Conversation

Mrtenz
Copy link
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
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
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