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

fix: replace tsutils with ts-api-tools #6428

Merged
merged 5 commits into from Feb 6, 2023

Conversation

JoshuaKGoldberg
Copy link
Member

PR Checklist

Overview

Uses ts-api-tools as a drop-in replacement for tsutils.

Note that tsutils provides some is* typeguards that are now exposed by TypeScript (e.g. ts.isBinaryExpression). I've gone ahead and switched to the TypeScript versions in this PR. Once #5573 is in we'll have CI checking to make sure our TypeScript version range supports them.

@JoshuaKGoldberg JoshuaKGoldberg added this to the 6.0.0 milestone Feb 6, 2023
@typescript-eslint
Copy link
Contributor

Thanks for the PR, @JoshuaKGoldberg!

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.

@nx-cloud
Copy link

nx-cloud bot commented Feb 6, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 5a9d797. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 47 targets

Sent with 💌 from NxCloud.

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review February 6, 2023 03:33
@codecov
Copy link

codecov bot commented Feb 6, 2023

Codecov Report

Merging #6428 (5a9d797) into v6 (62d5755) will decrease coverage by 0.08%.
The diff coverage is 92.30%.

Additional details and impacted files
@@            Coverage Diff             @@
##               v6    #6428      +/-   ##
==========================================
- Coverage   91.92%   91.85%   -0.08%     
==========================================
  Files         360      360              
  Lines       12499    12357     -142     
  Branches     3701     3652      -49     
==========================================
- Hits        11490    11350     -140     
+ Misses        707      705       -2     
  Partials      302      302              
Flag Coverage Δ
unittest 91.85% <92.30%> (-0.08%) ⬇️

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

Impacted Files Coverage Δ
...s/eslint-plugin/src/rules/prefer-optional-chain.ts 97.48% <0.00%> (-0.02%) ⬇️
packages/type-utils/src/containsAllTypesByName.ts 0.00% <0.00%> (ø)
packages/type-utils/src/getContextualType.ts 0.00% <0.00%> (ø)
packages/type-utils/src/predicates.ts 21.73% <50.00%> (ø)
packages/eslint-plugin/src/rules/await-thenable.ts 100.00% <100.00%> (ø)
packages/eslint-plugin/src/rules/dot-notation.ts 96.29% <100.00%> (ø)
...t-plugin/src/rules/no-confusing-void-expression.ts 100.00% <100.00%> (ø)
...kages/eslint-plugin/src/rules/no-dynamic-delete.ts 100.00% <100.00%> (ø)
...es/eslint-plugin/src/rules/no-floating-promises.ts 100.00% <100.00%> (ø)
...ackages/eslint-plugin/src/rules/no-implied-eval.ts 96.92% <100.00%> (ø)
... and 26 more

Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

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

Can we trust this new package? I've heard some terrible things about the maintainer.

25a.jpg

packages/eslint-plugin/src/rules/no-floating-promises.ts Outdated Show resolved Hide resolved
@@ -11,6 +11,7 @@ module.exports = {
'tsx',
'mts',
'mtsx',
'cjs',
Copy link
Member Author

Choose a reason for hiding this comment

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

ts-api-tools formats its output files as .js with ES modules. But it also includes an additional set of .cjs files for CJS users. This allows Jest to consider .cjs files (which it didn't before) - and look at them before .js files.

@JoshuaKGoldberg
Copy link
Member Author

Note that I renamed the package to ts-api-utils in JoshuaKGoldberg/ts-api-utils#28. We don't have to take action on the rename just yet. Just a note for the next time we need to bump the package version.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants