Skip to content

Latest commit

 

History

History
31 lines (18 loc) · 924 Bytes

no-module-extensions.md

File metadata and controls

31 lines (18 loc) · 924 Bytes

suitescript/no-module-extensions

🔧 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.

Rule Details

✅ 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) {});

Version

This rule was introduced in version 1.0.3