no-sync

- Disallow synchronous methods

This rule is aimed at preventing synchronous methods from being called in Node.js. It looks specifically for the method suffix “Sync” (as is the convention with Node.js operations).

What ESLint should do when it catches the rule break

Show a warning

Options

allowAtRootLevel

Allows synchronous methods at the top level of a file, outside of any functions.

Rule examples

You can check them out here.