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
Add linter error preventing use of async outside the test suite
We want to keep the runtime dependency footprint small, so that means
avoiding use of `async` at runtime (which creates a dependency on the
Regenerator runtime).
There is no built-in eslint rule for this, so we make a custom one.
Test plan:
Add an `async` function to a file, run `yarn run lint` and see:
graphql-js/src/subscription/subscribe.js
288:1 error async functions are not allowed outside of the test suite no-async
✖ 1 problem (1 error, 0 warnings)
Note that no errors are issued for the `async` functions in the test
suite.
Closes: #1008
0 commit comments