no-amd
Added in v0.9.4Configuration
rslint.config.ts
Rule Details
Disallow AMD require and define calls in ES module scope. This rule helps migrate AMD modules to ES imports.
A call is reported when its callee is the identifier require or define, it has exactly two arguments, and its first argument is an array literal. The second argument can be any expression.
Calls inside nested scopes, including functions and blocks, are allowed. CommonJS require("module") calls and files configured with sourceType: "script" or "commonjs" are also allowed. Local bindings named require or define do not exempt calls in module scope.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
Options
This rule has no options and provides no automatic fixes or suggestions.