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

feat(eslint-plugin): [consistent-type-imports] support TS4.5 inline import specifiers #4237

Merged
merged 2 commits into from Dec 6, 2021

Conversation

bradzacher
Copy link
Member

PR Checklist

Overview

@bradzacher bradzacher added the enhancement New feature or request label Nov 30, 2021
@typescript-eslint
Copy link
Contributor

Thanks for the PR, @bradzacher!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@netlify
Copy link

netlify bot commented Nov 30, 2021

✔️ Deploy Preview for typescript-eslint ready!

🔨 Explore the source changes: da02697

🔍 Inspect the deploy log: https://app.netlify.com/sites/typescript-eslint/deploys/61a820161bfcdf000868cd19

😎 Browse the preview: https://deploy-preview-4237--typescript-eslint.netlify.app

@bradzacher bradzacher mentioned this pull request Nov 30, 2021
8 tasks
@bradzacher bradzacher force-pushed the 4.5-consistent-type-imports-support branch from 36c6003 to 037b0b9 Compare November 30, 2021 06:17
@codecov
Copy link

codecov bot commented Nov 30, 2021

Codecov Report

Merging #4237 (da02697) into main (833f822) will decrease coverage by 0.01%.
The diff coverage is 93.33%.

@@            Coverage Diff             @@
##             main    #4237      +/-   ##
==========================================
- Coverage   93.32%   93.31%   -0.02%     
==========================================
  Files         169      169              
  Lines        9440     9454      +14     
  Branches     2963     2967       +4     
==========================================
+ Hits         8810     8822      +12     
- Misses        235      236       +1     
- Partials      395      396       +1     
Flag Coverage Δ
unittest 93.31% <93.33%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...eslint-plugin/src/rules/consistent-type-imports.ts 93.03% <93.33%> (-0.45%) ⬇️

@gajus
Copy link

gajus commented Dec 1, 2021

Seems like this failed for unrelated reasons. How do we re-run the pipeline?

@akphi
Copy link

akphi commented Dec 21, 2021

@bradzacher would you accept a PR for a boolean flag that enforces prefer using mixed mode when possible? For example:

e.g. @typescript-eslint/consistent-type-imports: ["error", { "preferMixedTypeImports": true }],

// ERROR
import type { c } from './c';
import { a } from './a'; 
import type { b } from './a';

// NO ERROR
import type { c } from './c';
import { a, type b } from './a'; 

As you said, a fixer is complicated, but for folks who want to use this new syntax, I imagine this could be a useful at least.

@bradzacher
Copy link
Member Author

bradzacher commented Dec 21, 2021

please file an issue to discuss this, as per our contributing guidelines.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants