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

docs: blog post on Avoidinganys with Linting and TypeScript#10362

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

Conversation

JoshuaKGoldberg
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg commentedNov 20, 2024
edited
Loading

PR Checklist

Overview

Walks through howanys can sneak in even withnoImplicitAny, then our suite of rules, as well as some other useful helpers.

I'm having a bit of writer's block trying to write friendly prose here. If anybody can suggest how to make the writing more approachable, I'd appreciate it.

💖

ronami reacted with rocket emoji
@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 onhttps://opencollective.com/typescript-eslint.

@netlifyNetlify
Copy link

netlifybot commentedNov 20, 2024
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commit6ed0cb0
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/678e5bcd9eb98b0008a2840b
😎 Deploy Previewhttps://deploy-preview-10362--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: 99 (🟢 up 1 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.

@nx-cloudNx Cloud
Copy link

nx-cloudbot commentedNov 20, 2024
edited
Loading

View yourCI Pipeline Execution ↗ for commit6ed0cb0.

CommandStatusDurationResult
nx test eslint-plugin --coverage=false✅ Succeeded7m 33sView ↗
nx test eslint-plugin✅ Succeeded5m 57sView ↗
nx test typescript-eslint✅ Succeeded4sView ↗
nx test visitor-keys✅ Succeeded<1sView ↗
nx test type-utils✅ Succeeded<1sView ↗
nx run types:build✅ Succeeded<1sView ↗
nx test utils✅ Succeeded<1sView ↗
nx test typescript-estree✅ Succeeded<1sView ↗
Additional runs (24)✅ Succeeded...View ↗

☁️Nx Cloud last updated this comment at2025-01-20 14:42:39 UTC

</TabItem>
</Tabs>

One the types for `@example/package` are fixed to no longer produce a type error, the comment directive will itself produce a type error asking to delete itself.
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I don't think this blog post should explain how// @ts-expect-error /// @ts-ignore work. I think that'd be better served in a separate post on a TypeScript-dedicated page.

I haven't found one online I truly like so I might just put it on learningtypescript.com... the ideal state would be to have a dedicated page on the first-party typescriptlang.org docs IMO.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

LearningTypeScript/site#143

It's blocked oneslint/eslint.org#664, and I don't think it's horrible if we don't include a link to it in the blog post. 🤷

@codecovCodecov
Copy link

codecovbot commentedNov 20, 2024
edited
Loading

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.15%. Comparing base(a175189) to head(8f77f28).
Report is 22 commits behind head on main.

Current head8f77f28 differs from pull request most recent head6ed0cb0

Pleaseupload reports for the commit6ed0cb0 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@##             main   #10362      +/-   ##==========================================+ Coverage   87.00%   87.15%   +0.15%==========================================  Files         447      448       +1       Lines       15586    15578       -8       Branches     4542     4551       +9     ==========================================+ Hits        13560    13577      +17+ Misses       1671     1645      -26- Partials      355      356       +1
FlagCoverage Δ
unittest87.15% <ø> (+0.15%)⬆️

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

see 88 files with indirect coverage changes

@JoshuaKGoldbergJoshuaKGoldberg changed the title[WIP] docs: blog post on catching anydocs: blog post on catching anyJan 2, 2025
@JoshuaKGoldbergJoshuaKGoldberg marked this pull request as ready for reviewJanuary 2, 2025 09:30
Co-authored-by: YeonJuan <yeonjuan93@naver.com>
Copy link
Member

@ronamironami left a comment

Choose a reason for hiding this comment

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

Looks amazing 💯

Comment on lines 200 to 201
`// @ts-expect-error` and `// @ts-ignore` are almost the same, except `// @ts-expect-error` will produce a new type error if its line doesn't already have one.
It's generally preferable to use `// @ts-expect-error` over `// @ts-ignore`.
Copy link
Member

@ronamironamiJan 4, 2025
edited
Loading

Choose a reason for hiding this comment

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

I'm not sure if it's too niche to mention, but the error type (which can be created using the ignore directives) also counts as anany.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Ha, yeah, I think I'll skip that morass of confusing API nuances...

ronami reacted with thumbs up emoji
JoshuaKGoldbergand others added4 commitsJanuary 7, 2025 09:21
Co-authored-by: Ronen Amiel <ronen.amiel@gmail.com>
Co-authored-by: Ronen Amiel <ronen.amiel@gmail.com>
ronami
ronami previously approved these changesJan 7, 2025
Copy link
Member

@ronamironami left a comment
edited
Loading

Choose a reason for hiding this comment

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

The first time I enabled theno-unsafe-* rules, I was shocked at how manyanys I had in my code base without even realizing it.

Explaining this better is so important 💯

JoshuaKGoldberg reacted with rocket emoji
@JoshuaKGoldbergJoshuaKGoldberg changed the titledocs: blog post on catching anydocs: blog post on avoidinganysJan 13, 2025
@JoshuaKGoldberg
Copy link
MemberAuthor

FYI ine62fb94 I also reworked the opening paragraphs a bit. IMO they were too long before.

@JoshuaKGoldbergJoshuaKGoldberg added the 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labelJan 13, 2025
@github-actionsgithub-actionsbot removed the 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labelJan 16, 2025
kirkwaiblinger
kirkwaiblinger previously approved these changesJan 19, 2025
Copy link
Member

@kirkwaiblingerkirkwaiblinger left a comment

Choose a reason for hiding this comment

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

random gif

Co-authored-by: Kirk Waiblinger <53019676+kirkwaiblinger@users.noreply.github.com>
@JoshuaKGoldberg
Copy link
MemberAuthor

👍 I set the date for this to be tomorrow, the 21st, since today is a holiday in the US. I can manually deploy in the morning.

@JoshuaKGoldbergJoshuaKGoldberg merged commit55bed75 intotypescript-eslint:mainJan 21, 2025
59 of 60 checks passed
@JoshuaKGoldbergJoshuaKGoldberg deleted the blog-post-catching-any branchJanuary 21, 2025 14:43
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsJan 29, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@yeonjuanyeonjuanyeonjuan left review comments

@kirkwaiblingerkirkwaiblingerkirkwaiblinger left review comments

@ronamironamiAwaiting requested review from ronami

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Blog: Write a blog post on no-unsafe-* rules
4 participants
@JoshuaKGoldberg@ronami@yeonjuan@kirkwaiblinger

[8]ページ先頭

©2009-2025 Movatter.jp