🔧 The --fix
option on the command line can automatically fix some of the problems reported by this rule.
Restricts filename extensions on module dependencies.
Note: As of January 2021, there appears to be a NetSuite bug that intermittently causes an error (
SuiteScript 2.1 entry point scripts must implement one script type function..
) when attempting to upload script files that include dependencies with file extensions.
✅ The following pattern is correct:
/* eslint suitescript/no-module-extensions: "error" */
define(['./lib'], function(lib) {});
❌ The following pattern is incorrect:
/* eslint suitescript/no-module-extensions: "error" */
define(['./lib.js'], function(lib) {});
This rule was introduced in version 1.0.3