Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
docs: blog post on Avoidingany
s 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
docs: blog post on Avoidingany
s with Linting and TypeScript#10362
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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. |
netlifybot commentedNov 20, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✅ Deploy Preview fortypescript-eslint ready!
To edit notification comments on pull requests, go to yourNetlify site configuration. |
Uh oh!
There was an error while loading.Please reload this page.
nx-cloudbot commentedNov 20, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
View yourCI Pipeline Execution ↗ for commit6ed0cb0.
☁️Nx Cloud last updated this comment at |
Uh oh!
There was an error while loading.Please reload this page.
</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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
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. 🤷
codecovbot commentedNov 20, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
Flags with carried forward coverage won't be shown.Click here to find out more. |
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: YeonJuan <yeonjuan93@naver.com>
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks amazing 💯
Uh oh!
There was an error while loading.Please reload this page.
`// @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`. |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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...
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Ronen Amiel <ronen.amiel@gmail.com>
Co-authored-by: Ronen Amiel <ronen.amiel@gmail.com>
ronami left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
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 manyany
s I had in my code base without even realizing it.
Explaining this better is so important 💯
any
sFYI ine62fb94 I also reworked the opening paragraphs a bit. IMO they were too long before. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Kirk Waiblinger <53019676+kirkwaiblinger@users.noreply.github.com>
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Co-authored-by: Kirk Waiblinger <53019676+kirkwaiblinger@users.noreply.github.com>
👍 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. |
55bed75
intotypescript-eslint:mainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
PR Checklist
Overview
Walks through how
any
s 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.
💖