@btonasse/eslint-plugin-suitescript

1.6.2 • Public • Published

eslint-plugin-suitescript

NetSuite SuiteScript v1/v2 linting rules for ESLint. This is a fork of the original repo of Adam Davies, which doesn't seem to be maintained anymore.

This fork uses the newer flat file configuration files instead of eslintrc.

Installation

Installation per project is highly recommended:

$ npm i -D eslint eslint-plugin-suitescript

Configuration

Add "suitescript" to the plugins section of your ESLint config file.

"plugins": ["suitescript"]

Enable the rules that you would like to use.

"rules": {
  "suitescript/script-type": "error",
  "suitescript/no-log-module": "error",
}

Or use a predefined setting for quick setup (choose one).

import suitescript from @btonasse/eslint-plugin-suitescript


export default [
  suitescript.configs.suitescript1, // Add support for global nlapi functions
  suitescript.configs.suitescript2, // Add support for SS2 globals (define, require, log, util)
  ...suitescript.configs.all  // All available rules
]

List of supported rules

License

eslint-plugin-suitescript is licensed under the MIT License.

Package Sidebar

Install

npm i @btonasse/eslint-plugin-suitescript

Weekly Downloads

20

Version

1.6.2

License

MIT

Unpacked Size

44.1 kB

Total Files

20

Last publish

Collaborators

  • btonasse