Open jorgezreik opened 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 97.59%. Comparing base (
a944aa5
) to head (7f9a2bd
).:exclamation: Current head 7f9a2bd differs from pull request most recent head 4d1e087
Please upload reports for the commit 4d1e087 to get more accurate results.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I see some examples using single and double quotes - great! - but none using backticks. Can we add some? (whether it's supported or not)
I knew I'd miss a few things 😅 Thanks for the feedback, really appreciate it!
Backticks don't work with use server, but great idea to test them. Adding now.
A semi-related question that came to mind that I'd like advice on:
Other ESLint rules like eslint/require-await
and typescript-eslint/require-await
report async functions that do not have an await operator as incorrect. Any ideas on how we can make rules like these not report on "use server"
? Adding options to these rules to ignore functions with certain directives would do the trick, but an option like that is React-specific enough that it's unlikely to get merged.
The require-await
rules are harmful and bad and should never have existed in the first place. An async function
without any await
s is perfectly acceptable (unlike a generator without a yield
).
As such, the solution there is to just disable those horrifically foolish rules.
Adds a new rule to require that a server actions (functions with the
'use server'
directive) be async as specified by the server actions spec. Suggests fixes for server actions that aren't async by adding the async keyword.