Skip to content

Latest commit

 

History

History
149 lines (124 loc) · 2.43 KB

File metadata and controls

149 lines (124 loc) · 2.43 KB

suitescript/entry-points

Enforces the inclusion of at least one entry point based on the value provided in the @NScriptType tag. If no tag is provided, no entry point will be enforced.

Rule Details

✅ The following patterns are correct:

/* eslint suitescript/entry-points: "error" */

/**
 * @NScriptType UserEventScript
 */

define([], function () {
  return {
    beforeLoad: function () {},
  };
});
/* eslint suitescript/entry-points: "error" */

/**
 * @NScriptType ClientScript
 */

define([], function () {
  return {
    pageInit: function () {},
    somethingElse: function () {},
  };
});
/* eslint suitescript/entry-points: "error" */

// No @NScriptType tag

define([], function () {
  return {
    somethingElse: function () {},
  };
});

❌ The following patterns are incorrect:

/* eslint suitescript/entry-points: "error" */

/**
 * @NScriptType UserEventScript
 */

define([], function () {});
/* eslint suitescript/entry-points: "error" */

/**
 * @NScriptType ClientScript
 */

define([], function () {
  return {
    somethingElse: function () {},
  };
});

Script Types and Their Respective Entry Points

  • BankConnectivityPlugin
    • getRequiredConfigurationFields
    • downloadPreviousDayBankStatementFile
  • BundleInstallationScript
    • afterInstall
    • afterUpdate
    • beforeInstall
    • beforeUninstall
    • beforeUpdate
  • ClientScript
    • fieldChanged
    • lineInit
    • pageInit
    • postSourcing
    • saveRecord
    • sublistChanged
    • validateDelete
    • validateField
    • validateInsert
    • validateLine
    • localizationContextEnter
    • localizationContextExit
  • CustomGLPlugin
    • customizeGlImpact
  • DatasetBuilderPlugin
    • createDataset
  • FiConnectivityPlugin
    • getConfigurationIFrameUrl
    • getAccounts
    • getTransactionData
  • FiParserPlugin
    • parseData
    • getStandardTransactionCodes
    • getExpenseCodes
    • getConfigurationPageUrl
  • MapReduceScript
    • getInputData
    • map
    • reduce
    • summarize
  • MassUpdateScript
    • each
  • PluginTypeImpl
  • Portlet
    • render
  • Restlet
    • delete
    • get
    • post
    • put
  • ScheduledScript
    • execute
  • SDFInstallationScript
    • run
  • Suitelet
    • onRequest
  • UserEventScript
    • afterSubmit
    • beforeLoad
    • beforeSubmit
  • WorkbookBbuilderPlugin
    • createWorkbook
  • WorkflowActionScript
    • onAction

Version

This rule was introduced in version 1.0.0.

Source