Skip to content

Commit 7fd3e6b

Browse files
committed
minor doc changes
1 parent f536234 commit 7fd3e6b

File tree

6 files changed

+23
-11
lines changed

6 files changed

+23
-11
lines changed

docs/rules/module-vars.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,9 @@
22

33
Enforces correct module identifiers for each configured module name.
44

5-
## Rule Details
6-
75
Requires at least one module name to be specified to take effect.
86

9-
```js
10-
'suitescript/module-vars': [<enabled>, {
11-
moduleName: <string>
12-
...
13-
}]
14-
```
7+
## Rule Details
158

169
:white_check_mark: The following patterns are **correct**:
1710

@@ -39,6 +32,17 @@ define(['N/record'], function(rec) {});
3932
define(['N/ui/serverWidget'], function(ui) {});
4033
```
4134

35+
## Rule Options
36+
37+
Specify at least one module name with a corresponding variable name.
38+
39+
```js
40+
'suitescript/module-vars': [<enabled>, {
41+
moduleName: <string>
42+
...
43+
}]
44+
```
45+
4246
## Module Names
4347

4448
- N/action

docs/rules/no-amd-name.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# suitescript/no-amd-name
22

3+
:wrench: _The `--fix` option on the command line can automatically fix some of the problems reported by this rule._
4+
35
Restricts naming of AMD modules.
46

7+
Naming AMD modules [should generally be avoided](https://requirejs.org/docs/whyamd.html#namedmodules) because compilers will handle the ID-ing of modules internally where necessary.
8+
59
## Rule Details
610

711
:white_check_mark: The following pattern is **correct**:

docs/rules/no-extra-modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# suitescript/no-extra-modules
22

3-
Enforces an equal number of module literals and identifiers in the `define` call.
3+
Enforces an equal number of module literals and identifiers in the `define` call arguments.
44

55
## Rule Details
66

docs/rules/no-invalid-modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# suitescript/no-invalid-modules
22

3-
Enforces valid SuiteScript module names in `define` array.
3+
Enforces valid SuiteScript module names in the `define` array.
44

55
## Rule Details
66

docs/rules/no-log-module.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
Restricts loading of the N/log module in favor of global `log`.
44

5-
> **Note:** By default, the N/log module is allowed in client scripts because there it is used to log to NetSuite where it would otherwise be impossible. See the rule options below to modify this.
5+
In most cases, global `log` can be used instead of the N/log module.
66

77
## Rule Details
88

9+
By default, the N/log module is allowed in client scripts because there it is used to log to NetSuite where it would otherwise be impossible. See the rule options below to modify this.
10+
911
:white_check_mark: The following pattern is **correct**:
1012

1113
```js

docs/rules/no-module-extensions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# suitescript/no-module-extensions
22

3+
:wrench: _The `--fix` option on the command line can automatically fix some of the problems reported by this rule._
4+
35
Enforces no filename extensions on module dependencies.
46

57
> **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.

0 commit comments

Comments
 (0)