global-require

- Require require() calls to be placed at top-level module scope

This rule requires all calls to require() to be at the top level of the module, similar to ES6 import and export statements, which also can occur only at the top level.

What ESLint should do when it catches the rule break

Show a warning

Rule examples

You can check them out here.