no-var-requires
Configuration
rslint.config.ts
Rule Details
Disallow require statements except in import statements. In other words, the use of forms such as var foo = require("foo") is banned. Instead, use ES6-style imports or TypeScript's import foo = require("foo") syntax.
Standalone require() calls (as expression statements) and TypeScript import ... = require(...) declarations are allowed.
Examples of incorrect code for this rule:
Examples of correct code for this rule: