An ESLint plugin that enforces code conventions for RequireJS (AMD) modules. Version 4.0.1 requires ESLint >=3.0.0 and Node >=6. Provides 13 rules covering possible errors (e.g., no-invalid-define, no-multiple-define, no-js-extension) and stylistic choices (e.g., no-named-define, no-amd-define). Includes a bundled 'recommended' config that enables all recommended rules and sets the amd environment. Under active development with frequent updates. Compared to other module linting plugins, this is the only dedicated RequireJS/AMD plugin for ESLint.
npm install eslint-plugin-requirejsVerified import paths — ran on the pinned version, not inferred.
Configures ESLint with the requirejs plugin and recommended rules, with example valid and invalid module definitions.
Use Node >=6 and ESLint >=3.0.0. For older environments, install eslint-plugin-requirejs@3.2.0.
Use rule names like 'requirejs/no-invalid-define', not bare rule name.
Set extends to 'plugin:requirejs/recommended'.
Run 'npm install --save-dev eslint-plugin-requirejs' and ensure node_modules is in the correct location.
Use 'requirejs/no-invalid-define' in your rules object.
Use 'off', 'warn', 'error', or 0, 1, 2.
No dependency data recorded yet.