You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
featureFeature was the initial reason of the PR. From Conventional Commits.
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
It is really common to have the code like this:
This happens since the
Standard
config enforces a developer to check the result status.Checking the result status is a good feature and we don't need to avoid it for sure.
But it can be hidden to not lose the focus when it does not play the main role:
A new plugin creation for it won't be too hard, I suppose.
Complexity: Low
Hard Requirements:
fetch
should support the following signature -fetch(key, fallback)
.fetch
should support the following signature -fetch(key, &block)
, where the block return value is afallback
.fetch
should return the data attribute bykey
(result.data[key]
).fetch
should return thefallback
value.fetch
should return thefallback
value.Notes:
result.data[key]
already raises an exception when the status is not checked, so no need to introduce a new exception class.fetch
with its default logic.fetch
logic (block).Beta Was this translation helpful? Give feedback.
All reactions