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(utils): extract isNotTokenOfTypeWithConditions out of ast-utils' predicates #4502

Merged
merged 1 commit into from Feb 24, 2022

Conversation

MichaelDeBoey
Copy link
Contributor

This is the negative version of what I did in #3977

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @MichaelDeBoey!

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 Feb 1, 2022

❌ Deploy Preview for typescript-eslint failed.

🔨 Explore the source changes: 19be9df

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

>) =>
(
token,
): token is Exclude<
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, linting obliges me to add this type a second time 😢

@nx-cloud
Copy link

nx-cloud bot commented Feb 1, 2022

☁️ Nx Cloud Report

CI ran the following commands for commit 19be9df. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 48 targets

Sent with 💌 from NxCloud.

@codecov
Copy link

codecov bot commented Feb 1, 2022

Codecov Report

Merging #4502 (4dc75d3) into main (823b945) will decrease coverage by 2.43%.
The diff coverage is 83.33%.

❗ Current head 4dc75d3 differs from pull request most recent head 19be9df. Consider uploading reports for the commit 19be9df to get more accurate results

@@            Coverage Diff             @@
##             main    #4502      +/-   ##
==========================================
- Coverage   94.62%   92.19%   -2.44%     
==========================================
  Files         149      204      +55     
  Lines        8072     8863     +791     
  Branches     2581     2752     +171     
==========================================
+ Hits         7638     8171     +533     
- Misses        239      483     +244     
- Partials      195      209      +14     
Flag Coverage Δ
unittest 92.19% <83.33%> (-2.44%) ⬇️

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

Impacted Files Coverage Δ
packages/utils/src/ast-utils/helpers.ts 68.18% <75.00%> (ø)
packages/utils/src/ast-utils/predicates.ts 95.55% <100.00%> (ø)
packages/eslint-plugin/src/util/misc.ts 93.33% <0.00%> (-1.12%) ⬇️
...eslint-plugin/src/rules/no-useless-empty-export.ts
...plugin/src/rules/no-redundant-type-constituents.ts
...internal/src/rules/no-typescript-default-import.ts 100.00% <0.00%> (ø)
packages/type-utils/src/getTypeArguments.ts 25.00% <0.00%> (ø)
packages/type-utils/src/getSourceFileOfNode.ts 0.00% <0.00%> (ø)
packages/utils/src/eslint-utils/RuleTester.ts 9.30% <0.00%> (ø)
... and 52 more

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

❤️‍🔥

@JoshuaKGoldberg JoshuaKGoldberg enabled auto-merge (squash) February 23, 2022 22:04
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Ah, actually, codecov is right - could you make sure these are unit tested please?

At least isNotOptionalChainPunctuator is duplicated in user code.

@JoshuaKGoldberg JoshuaKGoldberg added the awaiting response Issues waiting for a reply from the OP or another party label Feb 23, 2022
@MichaelDeBoey
Copy link
Contributor Author

@JoshuaKGoldberg The other helper functions also don't have any tests, so I think this is good to go as is?

@JoshuaKGoldberg
Copy link
Member

Hmm, I suppose so. It would be nice to have them be unit tested directly but I guess if none of them are we can have that as a followup issue. 🤷

@JoshuaKGoldberg JoshuaKGoldberg added the 1 approval PR that a maintainer has LGTM'd - any maintainer can merge this when ready label Feb 24, 2022
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

@JoshuaKGoldberg
Copy link
Member

This one I definitely cannot merge without an adult's help:

Screenshot of failing expected checks blocking merge

@bradzacher bradzacher merged commit 66501d6 into typescript-eslint:main Feb 24, 2022
@bradzacher bradzacher removed the awaiting response Issues waiting for a reply from the OP or another party label Feb 24, 2022
@MichaelDeBoey MichaelDeBoey deleted the patch-50 branch February 24, 2022 09:20
JoshuaKGoldberg pushed a commit to JoshuaKGoldberg/typescript-eslint that referenced this pull request Feb 27, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1 approval PR that a maintainer has LGTM'd - any maintainer can merge this when ready enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants