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-exports] support TS4.5 inline export specifiers #4236

Merged
merged 2 commits into from Dec 6, 2021

Conversation

bradzacher
Copy link
Member

PR Checklist

Overview

  • make sure the rule doesn't false-positive for inline type specifiers.
    • rule allows the following:
      • export { type T1, type T2 };
      • export { type T, value };
      • export type { T };
      • export { value };
  • support the specifier in the fixers
    • export { type T1, T2 } is fixed to export type { T1, T2 };
  • add an option to allow fixing "mixed" exports using inline specifier (default false)
    • when true, export { value, T }; is fixed to export { value, type T };
    • when false, it is fixed as before with a separate export type declaration.

@bradzacher bradzacher added the enhancement: plugin rule option New rule option for an existing eslint-plugin rule 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 failed.

🔨 Explore the source changes: 54de448

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

@bradzacher bradzacher mentioned this pull request Nov 30, 2021
8 tasks
@bradzacher bradzacher force-pushed the 4.5-consistent-type-exports-support branch from e243efa to ecbc29f Compare November 30, 2021 00:26
@codecov
Copy link

codecov bot commented Nov 30, 2021

Codecov Report

Merging #4236 (54de448) into main (833f822) will increase coverage by 0.05%.
The diff coverage is 94.44%.

@@            Coverage Diff             @@
##             main    #4236      +/-   ##
==========================================
+ Coverage   93.32%   93.38%   +0.05%     
==========================================
  Files         169      152      -17     
  Lines        9440     8071    -1369     
  Branches     2963     2592     -371     
==========================================
- Hits         8810     7537    -1273     
+ Misses        235      180      -55     
+ Partials      395      354      -41     
Flag Coverage Δ
unittest 93.38% <94.44%> (+0.05%) ⬆️

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

Impacted Files Coverage Δ
...eslint-plugin/src/rules/consistent-type-exports.ts 97.70% <94.44%> (+1.86%) ⬆️
...pt-estree/src/create-program/createWatchProgram.ts
...pt-estree/src/ts-estree/estree-to-ts-node-types.ts
...t-estree/src/create-program/useProvidedPrograms.ts
...ript-estree/src/create-program/createSourceFile.ts
...escript-estree/src/semantic-or-syntactic-errors.ts
...estree/src/create-program/createIsolatedProgram.ts
packages/typescript-estree/src/node-utils.ts
packages/typescript-estree/src/version-check.ts
...-estree/src/create-program/createProjectProgram.ts
... and 8 more

@bradzacher bradzacher merged commit be4d976 into main Dec 6, 2021
@bradzacher bradzacher deleted the 4.5-consistent-type-exports-support branch December 6, 2021 18:04
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement: plugin rule option New rule option for an existing eslint-plugin rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant