-
Notifications
You must be signed in to change notification settings - Fork 13
Turn on type-aware lint rules #2259
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
variant: 'error', | ||
title: `Error stopping instance '${instance.name}'`, | ||
content: error.message, | ||
}), |
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.
This is interesting! What happened here is that the new eslint rule made me remove the async
because there was no await
, which allowed TS to see that the function was not returning a promise like it was supposed to (I guess every async
function returns Promise<_>
automatically), so that errored, alerting me to the fact that this is set up wrong. It was working fine because of the manual toast, but the errorTitle
bit below now covers that because the error handled inside confirmAction
.
This is kind of a confusing pattern, but I think the idea was to ensure that there is always some error toast. On unconfirmed actions like instance start, there's nothing forcing you to handle the error, so if you forget to define onError
, it does nothing on error, which is annoying. The problem now is that on ones wrapped in confirmAction
, you don't see an onError
, so maybe you think that's the normal way, but for non-confirmed actions you need to define it.
…nsole) oxidecomputer/console@a228b75...13d46e8 * [13d46e8f](oxidecomputer/console@13d46e8f) oxidecomputer/console#2272 * [13ce748f](oxidecomputer/console@13ce748f) oxidecomputer/console#2269 * [ab2939bf](oxidecomputer/console@ab2939bf) oxidecomputer/console#2262 * [c9f2bba3](oxidecomputer/console@c9f2bba3) oxidecomputer/console#2252 * [9b7ea533](oxidecomputer/console@9b7ea533) oxidecomputer/console#2261 * [bf97ebc2](oxidecomputer/console@bf97ebc2) oxidecomputer/console#2259 * [a18c7a8f](oxidecomputer/console@a18c7a8f) don't need to exclude IE 11 anymore
oxidecomputer/console@a228b75...69ba87b * [69ba87b7](oxidecomputer/console@69ba87b7) oxidecomputer/console#2246 * [13d46e8f](oxidecomputer/console@13d46e8f) oxidecomputer/console#2272 * [13ce748f](oxidecomputer/console@13ce748f) oxidecomputer/console#2269 * [ab2939bf](oxidecomputer/console@ab2939bf) oxidecomputer/console#2262 * [c9f2bba3](oxidecomputer/console@c9f2bba3) oxidecomputer/console#2252 * [9b7ea533](oxidecomputer/console@9b7ea533) oxidecomputer/console#2261 * [bf97ebc2](oxidecomputer/console@bf97ebc2) oxidecomputer/console#2259 * [a18c7a8f](oxidecomputer/console@a18c7a8f) don't need to exclude IE 11 anymore
oxidecomputer/console@a228b75...7fa8e6d * [7fa8e6d1](oxidecomputer/console@7fa8e6d1) oxidecomputer/console#2274 * [69ba87b7](oxidecomputer/console@69ba87b7) oxidecomputer/console#2246 * [13d46e8f](oxidecomputer/console@13d46e8f) oxidecomputer/console#2272 * [13ce748f](oxidecomputer/console@13ce748f) oxidecomputer/console#2269 * [ab2939bf](oxidecomputer/console@ab2939bf) oxidecomputer/console#2262 * [c9f2bba3](oxidecomputer/console@c9f2bba3) oxidecomputer/console#2252 * [9b7ea533](oxidecomputer/console@9b7ea533) oxidecomputer/console#2261 * [bf97ebc2](oxidecomputer/console@bf97ebc2) oxidecomputer/console#2259 * [a18c7a8f](oxidecomputer/console@a18c7a8f) don't need to exclude IE 11 anymore
oxidecomputer/console@a228b75...a9b325e * [a9b325e9](oxidecomputer/console@a9b325e9) forgot to revert tweak for testing * [7fa8e6d1](oxidecomputer/console@7fa8e6d1) oxidecomputer/console#2274 * [69ba87b7](oxidecomputer/console@69ba87b7) oxidecomputer/console#2246 * [13d46e8f](oxidecomputer/console@13d46e8f) oxidecomputer/console#2272 * [13ce748f](oxidecomputer/console@13ce748f) oxidecomputer/console#2269 * [ab2939bf](oxidecomputer/console@ab2939bf) oxidecomputer/console#2262 * [c9f2bba3](oxidecomputer/console@c9f2bba3) oxidecomputer/console#2252 * [9b7ea533](oxidecomputer/console@9b7ea533) oxidecomputer/console#2261 * [bf97ebc2](oxidecomputer/console@bf97ebc2) oxidecomputer/console#2259 * [a18c7a8f](oxidecomputer/console@a18c7a8f) don't need to exclude IE 11 anymore
…es) (#5871) oxidecomputer/console@a228b75...a9b325e * [a9b325e9](oxidecomputer/console@a9b325e9) forgot to revert tweak for testing * [7fa8e6d1](oxidecomputer/console@7fa8e6d1) oxidecomputer/console#2274 * [69ba87b7](oxidecomputer/console@69ba87b7) oxidecomputer/console#2246 * [13d46e8f](oxidecomputer/console@13d46e8f) oxidecomputer/console#2272 * [13ce748f](oxidecomputer/console@13ce748f) oxidecomputer/console#2269 * [ab2939bf](oxidecomputer/console@ab2939bf) oxidecomputer/console#2262 * [c9f2bba3](oxidecomputer/console@c9f2bba3) oxidecomputer/console#2252 * [9b7ea533](oxidecomputer/console@9b7ea533) oxidecomputer/console#2261 * [bf97ebc2](oxidecomputer/console@bf97ebc2) oxidecomputer/console#2259 * [a18c7a8f](oxidecomputer/console@a18c7a8f) don't need to exclude IE 11 anymore
I got nerd sniped by this tweet and first turned on the full recommended config (which I've tried before) and it was awful:
Then I read this great blog post, which is linked in the tweet
https://www.joshuakgoldberg.com/blog/rust-based-javascript-linters-fast-but-no-typed-linting-right-now/#recap-type-checked-linting
and it points to a couple of specific rules that it likes. So I tried turning those on and it is actually a little bit useful and doesn't slow things down that much (I also narrowed down the scope of what we're linting a bit).