This resolver can be used with eslint-plugin-import
to help identify import errors in NetSuite SuiteScript 2.x projects.
The AMD module loader in SuiteScript 2.x follows different semantics than Node. In particular, NetSuite does not resolve relative directory imports, and this resolver enables ESLint to identify errors in static analysis.
This resolver accepts a single configuration option: extensions
. This defaults to
[".js", ".ts", ".d.ts"]
and is passed to Substack's resolve
.
module.exports = {
settings: {
'import/resolver': {
'@dfh-foundation/eslint-import-resolver-netsuite': {},
},
},
}