Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(eslint-plugin): [no-unnecesary-type-assertion] treat unknown/any as nullable#8089

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

Josh-Cena
Copy link
Member

@Josh-CenaJosh-Cena commentedDec 18, 2023
edited
Loading

PR Checklist

Overview

Please tell me if I missed anything, but it turns out we aren't using either of the options ofisNullableType, and I'm not sure if they really matter, so I've removed them. Please let me know if they need to be kept for compatibility (I don't think they are part of the API surface but who knows)?

This change also touches several other rules, but their tests pass anyway, and from a rough look there shouldn't be extra errors.

@typescript-eslint
Copy link
Contributor

Thanks for the PR,@Josh-Cena!

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 onhttps://opencollective.com/typescript-eslint.

@netlifyNetlify
Copy link

netlifybot commentedDec 18, 2023
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commit99c1828
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/65a05c889affbb0008f44b40
😎 Deploy Previewhttps://deploy-preview-8089--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 92 (🔴 down 4 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 98 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to yourNetlify site configuration.

@Josh-CenaJosh-Cena changed the titlefix(eslint-plugin): [no-unnecesary-type-assertion] treat unknown/any …fix(eslint-plugin): [no-unnecesary-type-assertion] treat unknown/any as nullableDec 18, 2023
@JoshuaKGoldberg
Copy link
Member

Yeah great point on thetype-utils change... I don't know myself 😄 filed#8093.

@bradzacher
Copy link
Member

bradzacher commentedDec 18, 2023
edited
Loading

The package is part of our public API. We need to keep backwards compatibility.

Being poorly (or not at all 😅) documented doesn't change that. The only parts of exported packages that we may break at any time are explicitly marked as such in our package.json exports.

@Josh-Cena
Copy link
MemberAuthor

It is poorly documented and I don't even understand whatisReceiver is supposed to do. Can we keepisReceiver in the type but make it do nothing?

@JoshuaKGoldberg
Copy link
Member

I think we need to keepisReceiver in the typeand what it's doing now at runtime 😞 but a good followup for v7 would be to remove it.

@JoshuaKGoldbergJoshuaKGoldberg added the awaiting responseIssues waiting for a reply from the OP or another party labelJan 8, 2024
@bradzacher
Copy link
Member

It's been a long long time since#478 so I can't remember the full context for why it was added.

I believe the idea was that in a receiving location (eg the assignment target - the thing that's on the "receiving" end of an assignment) the util would specifically treat any as a "null". Based on the type flags any isn't null IIRC so it needs separate handling.

I think I went in a different direction and so the flag wasn't ever used.

@bradzacherbradzacher added bugSomething isn't working and removed awaiting responseIssues waiting for a reply from the OP or another party labelsJan 11, 2024
bradzacher
bradzacher previously approved these changesJan 11, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@StyleShitStyleShitStyleShit left review comments

@bradzacherbradzacherbradzacher left review comments

@JoshuaKGoldbergJoshuaKGoldbergAwaiting requested review from JoshuaKGoldberg

Assignees
No one assigned
Labels
bugSomething isn't working
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

[no-unnecessary-type-assertion] False negative on unknown!
4 participants
@Josh-Cena@JoshuaKGoldberg@bradzacher@StyleShit

[8]ページ先頭

©2009-2025 Movatter.jp