biome-plugin-suitescript 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +208 -149
- package/biome-manifest.json +95 -3
- package/configs/suitescript2.json +5 -5
- package/dist/bin/biome-plugin-suitescript.js +23 -23
- package/dist/cli/analyze.js +33 -3
- package/dist/lib/module-script-types.js +70 -0
- package/dist/lib/script-side.js +83 -0
- package/dist/lib/script-types.js +12 -0
- package/dist/lib/suitescript.js +23 -0
- package/dist/rules/noAmdName.grit +9 -9
- package/dist/rules/noBeforeSubmitRecordReload.js +19 -0
- package/dist/rules/noBrowserGlobals.js +23 -0
- package/dist/rules/noClientLog.js +14 -0
- package/dist/rules/noDynamicSuiteQL.js +24 -0
- package/dist/rules/noEmptyEntryPoints.js +19 -0
- package/dist/rules/noEval.js +21 -0
- package/dist/rules/noGlobalShadowing.js +34 -0
- package/dist/rules/noHardcodedSecrets.js +38 -0
- package/dist/rules/noHeaderUnderscores.js +23 -0
- package/dist/rules/noInsecureHttpsUrl.js +20 -0
- package/dist/rules/noLogModule.js +4 -1
- package/dist/rules/noMapReduceSearchResults.js +33 -0
- package/dist/rules/noMissingModules.js +26 -0
- package/dist/rules/noModuleExtensions.grit +12 -12
- package/dist/rules/noModuleScopeApiCalls.js +39 -0
- package/dist/rules/noNativeIterators.js +16 -0
- package/dist/rules/noQueryColumnFieldAndFormula.js +19 -0
- package/dist/rules/noRecordInLoop.js +31 -0
- package/dist/rules/noSuiteScript1Api.js +10 -0
- package/dist/rules/noUserEventContextSave.js +12 -0
- package/dist/rules/noWrongScriptTypeModules.js +28 -0
- package/dist/rules/requireClientValidateReturn.js +27 -0
- package/dist/rules/requireCustpagePrefix.js +22 -0
- package/package.json +83 -83
- package/schema.json +21 -21
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ast, defineRule, registerDiagnostic, } from "@biomejs/runtime/plugin";
|
|
2
|
+
import { pairs, parseDefine } from "../lib/define.js";
|
|
3
|
+
const FUNCTIONS = [
|
|
4
|
+
"JS_FUNCTION_EXPRESSION",
|
|
5
|
+
"JS_ARROW_FUNCTION_EXPRESSION",
|
|
6
|
+
"JS_FUNCTION_DECLARATION",
|
|
7
|
+
"JS_METHOD_OBJECT_MEMBER",
|
|
8
|
+
"JS_METHOD_CLASS_MEMBER",
|
|
9
|
+
];
|
|
10
|
+
// N/ APIs called while the define() callback runs (module scope) can fail on
|
|
11
|
+
// deploy; initialize lazily from an entry point instead. N/log is exempt.
|
|
12
|
+
export const noModuleScopeApiCalls = defineRule({
|
|
13
|
+
query: ast("JS_CALL_EXPRESSION"),
|
|
14
|
+
run(node) {
|
|
15
|
+
const def = parseDefine(node);
|
|
16
|
+
if (!def?.body)
|
|
17
|
+
return;
|
|
18
|
+
const aliases = new Set(pairs(def)
|
|
19
|
+
.filter((d) => d.name?.startsWith("N/") && d.name !== "N/log")
|
|
20
|
+
.map((d) => d.param?.text));
|
|
21
|
+
const visit = (n) => {
|
|
22
|
+
if (FUNCTIONS.includes(n.kind))
|
|
23
|
+
return;
|
|
24
|
+
if (n.kind === "JS_CALL_EXPRESSION") {
|
|
25
|
+
const callee = n.children()[0];
|
|
26
|
+
const object = callee?.kind === "JS_STATIC_MEMBER_EXPRESSION"
|
|
27
|
+
? callee.children()[0]?.text
|
|
28
|
+
: undefined;
|
|
29
|
+
if (object && aliases.has(object)) {
|
|
30
|
+
registerDiagnostic(n, "warning", `${callee?.text}() runs at module scope; call it from an entry point.`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
for (const child of n.children())
|
|
34
|
+
visit(child);
|
|
35
|
+
};
|
|
36
|
+
for (const child of def.body.children())
|
|
37
|
+
visit(child);
|
|
38
|
+
},
|
|
39
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ast, defineRule, registerDiagnostic } from "@biomejs/runtime/plugin";
|
|
2
|
+
// NetSuite runs GraalJS; Oracle's guidance is to use array methods, not
|
|
3
|
+
// generators or Symbol.iterator.
|
|
4
|
+
export const noNativeIterators = defineRule({
|
|
5
|
+
query: ast("JS_FUNCTION_DECLARATION", "JS_FUNCTION_EXPRESSION", "JS_STATIC_MEMBER_EXPRESSION"),
|
|
6
|
+
run(node) {
|
|
7
|
+
if (node.kind === "JS_STATIC_MEMBER_EXPRESSION") {
|
|
8
|
+
if (node.text === "Symbol.iterator") {
|
|
9
|
+
registerDiagnostic(node, "warning", "Avoid Symbol.iterator.");
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
else if (node.starToken) {
|
|
13
|
+
registerDiagnostic(node, "warning", "Avoid generator functions.");
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ast, defineRule, registerDiagnostic } from "@biomejs/runtime/plugin";
|
|
2
|
+
import { hasProperty } from "../lib/log.js";
|
|
3
|
+
// Oracle (N/query): a column's `formula` and `fieldId` "cannot be set at the same time."
|
|
4
|
+
export const noQueryColumnFieldAndFormula = defineRule({
|
|
5
|
+
query: ast("JS_OBJECT_EXPRESSION"),
|
|
6
|
+
run(node) {
|
|
7
|
+
if (!hasProperty(node, "fieldId") || !hasProperty(node, "formula"))
|
|
8
|
+
return;
|
|
9
|
+
const inColumn = node.ancestors().some((a) => {
|
|
10
|
+
if (a.kind === "JS_CALL_EXPRESSION")
|
|
11
|
+
return /createColumn$/.test(a.children()[0]?.text ?? "");
|
|
12
|
+
return (a.kind === "JS_PROPERTY_OBJECT_MEMBER" &&
|
|
13
|
+
a.children()[0]?.text === "columns");
|
|
14
|
+
});
|
|
15
|
+
if (inColumn) {
|
|
16
|
+
registerDiagnostic(node, "error", "A query column cannot set both fieldId and formula.");
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ast, defineRule, registerDiagnostic } from "@biomejs/runtime/plugin";
|
|
2
|
+
const LOOPS = [
|
|
3
|
+
"JS_FOR_STATEMENT",
|
|
4
|
+
"JS_FOR_OF_STATEMENT",
|
|
5
|
+
"JS_FOR_IN_STATEMENT",
|
|
6
|
+
"JS_WHILE_STATEMENT",
|
|
7
|
+
"JS_DO_WHILE_STATEMENT",
|
|
8
|
+
];
|
|
9
|
+
const ITERATORS = /\.(forEach|each|map)$/;
|
|
10
|
+
const RECORD_CALLS = ["record.load", "record.create"];
|
|
11
|
+
// Loading or creating a record per iteration burns governance; search or
|
|
12
|
+
// submitFields in bulk instead. Opt-in: Map/Reduce `map` handles one record per call.
|
|
13
|
+
export const noRecordInLoop = defineRule({
|
|
14
|
+
query: ast("JS_CALL_EXPRESSION"),
|
|
15
|
+
run(node) {
|
|
16
|
+
if (!RECORD_CALLS.includes(node.callee?.text ?? ""))
|
|
17
|
+
return;
|
|
18
|
+
const inLoop = node.ancestors().some((a) => {
|
|
19
|
+
if (LOOPS.includes(a.kind))
|
|
20
|
+
return true;
|
|
21
|
+
if (a.kind !== "JS_CALL_ARGUMENT_LIST")
|
|
22
|
+
return false;
|
|
23
|
+
const call = a.parent?.parent;
|
|
24
|
+
return (call?.kind === "JS_CALL_EXPRESSION" &&
|
|
25
|
+
ITERATORS.test(call.children()[0]?.text ?? ""));
|
|
26
|
+
});
|
|
27
|
+
if (inLoop) {
|
|
28
|
+
registerDiagnostic(node, "warning", `${node.callee?.text}() inside a loop; use a search or submitFields instead.`);
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ast, defineRule, registerDiagnostic } from "@biomejs/runtime/plugin";
|
|
2
|
+
// SuiteScript 2.1 only: nlapiXxx functions and nlobjXxx objects are 1.0 leftovers.
|
|
3
|
+
export const noSuiteScript1Api = defineRule({
|
|
4
|
+
query: ast("JS_REFERENCE_IDENTIFIER"),
|
|
5
|
+
run(node) {
|
|
6
|
+
if (/^(nlapi|nlobj)[A-Z]/.test(node.text)) {
|
|
7
|
+
registerDiagnostic(node, "error", `'${node.text}' is SuiteScript 1.0; use the SuiteScript 2.1 N/ modules.`);
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ast, defineRule, registerDiagnostic } from "@biomejs/runtime/plugin";
|
|
2
|
+
// Oracle: "You can't use record.Record.save() here" for the newRecord and
|
|
3
|
+
// oldRecord of a user event context; load the record to change it instead.
|
|
4
|
+
export const noUserEventContextSave = defineRule({
|
|
5
|
+
query: ast("JS_CALL_EXPRESSION"),
|
|
6
|
+
run(node) {
|
|
7
|
+
const callee = node.callee?.text ?? "";
|
|
8
|
+
if (/(^|\.)(newRecord|oldRecord)\.save$/.test(callee)) {
|
|
9
|
+
registerDiagnostic(node, "error", `${callee}() is not allowed; the context record is read-only.`);
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ast, defineRule, registerDiagnostic } from "@biomejs/runtime/plugin";
|
|
2
|
+
import { dependencies } from "../lib/biome-modules.js";
|
|
3
|
+
import { misplacedModule, sideOf, unsupportedModule, } from "../lib/module-script-types.js";
|
|
4
|
+
import { inferredTypes } from "../lib/script-side.js";
|
|
5
|
+
// Loading a client-only module in a server script (or the reverse), or a module
|
|
6
|
+
// a script type does not support, fails at runtime. The type comes from the
|
|
7
|
+
// entry points the module returns, so libraries and uninferable modules are
|
|
8
|
+
// never flagged.
|
|
9
|
+
export const noWrongScriptTypeModules = defineRule({
|
|
10
|
+
query: ast("JS_CALL_EXPRESSION", "JS_IMPORT"),
|
|
11
|
+
run(node) {
|
|
12
|
+
const deps = dependencies(node);
|
|
13
|
+
if (deps.length === 0)
|
|
14
|
+
return;
|
|
15
|
+
const types = inferredTypes(node);
|
|
16
|
+
if (!types)
|
|
17
|
+
return;
|
|
18
|
+
const side = sideOf(types);
|
|
19
|
+
const single = types.length === 1 ? types[0]?.name : undefined;
|
|
20
|
+
for (const { name, nameNode } of deps) {
|
|
21
|
+
const message = name &&
|
|
22
|
+
((side && misplacedModule(side, name)) ||
|
|
23
|
+
(single && unsupportedModule(single, name)));
|
|
24
|
+
if (message && nameNode)
|
|
25
|
+
registerDiagnostic(nameNode, "error", message);
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ast, defineRule, registerDiagnostic } from "@biomejs/runtime/plugin";
|
|
2
|
+
import { descendants, functionName, scriptSide } from "../lib/script-side.js";
|
|
3
|
+
const VALIDATORS = [
|
|
4
|
+
"saveRecord",
|
|
5
|
+
"validateField",
|
|
6
|
+
"validateLine",
|
|
7
|
+
"validateInsert",
|
|
8
|
+
"validateDelete",
|
|
9
|
+
];
|
|
10
|
+
// Oracle: saveRecord and validateField return "true ... false otherwise". Only a
|
|
11
|
+
// body with no `return <value>` at all is flagged; code paths are not analysed.
|
|
12
|
+
export const requireClientValidateReturn = defineRule({
|
|
13
|
+
query: ast("JS_FUNCTION_DECLARATION", "JS_FUNCTION_EXPRESSION", "JS_ARROW_FUNCTION_EXPRESSION", "JS_METHOD_OBJECT_MEMBER"),
|
|
14
|
+
run(node) {
|
|
15
|
+
const name = functionName(node);
|
|
16
|
+
if (!name || !VALIDATORS.includes(name))
|
|
17
|
+
return;
|
|
18
|
+
const body = node.children().find((c) => c.kind === "JS_FUNCTION_BODY");
|
|
19
|
+
if (!body || scriptSide(node) !== "client")
|
|
20
|
+
return;
|
|
21
|
+
for (const d of descendants(body)) {
|
|
22
|
+
if (d.kind === "JS_RETURN_STATEMENT" && d.children().length > 0)
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
registerDiagnostic(node, "warning", `'${name}' must return true or false.`);
|
|
26
|
+
},
|
|
27
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ast, defineRule, registerDiagnostic } from "@biomejs/runtime/plugin";
|
|
2
|
+
const ADDERS = /\.(addField|addFieldGroup|addSublist|addTab|addSubtab|addButton)$/;
|
|
3
|
+
// Oracle: the internal ID of a UI object added to a page "must be prefixed with
|
|
4
|
+
// custpage". Only a string literal `id` is checked.
|
|
5
|
+
export const requireCustpagePrefix = defineRule({
|
|
6
|
+
query: ast("JS_CALL_EXPRESSION"),
|
|
7
|
+
run(node) {
|
|
8
|
+
if (!ADDERS.test(node.callee?.text ?? ""))
|
|
9
|
+
return;
|
|
10
|
+
const options = node.arguments?.children()[0]?.children()[0];
|
|
11
|
+
if (options?.kind !== "JS_OBJECT_EXPRESSION")
|
|
12
|
+
return;
|
|
13
|
+
for (const member of options.children()[0]?.children() ?? []) {
|
|
14
|
+
const [name, value] = member.children();
|
|
15
|
+
if (name?.text === "id" &&
|
|
16
|
+
value?.kind === "JS_STRING_LITERAL_EXPRESSION" &&
|
|
17
|
+
!/^['"]custpage/.test(value.text)) {
|
|
18
|
+
registerDiagnostic(value, "warning", "The id of a UI object must start with 'custpage'.");
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
});
|
package/package.json
CHANGED
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "biome-plugin-suitescript",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Biome lint plugins and
|
|
5
|
-
"keywords": [
|
|
6
|
-
"biome-plugin",
|
|
7
|
-
"biome",
|
|
8
|
-
"suitescript",
|
|
9
|
-
"netsuite",
|
|
10
|
-
"lint"
|
|
11
|
-
],
|
|
12
|
-
"homepage": "https://github.com/nemchik/biome-plugin-suitescript#readme",
|
|
13
|
-
"bugs": "https://github.com/nemchik/biome-plugin-suitescript/issues",
|
|
14
|
-
"repository": {
|
|
15
|
-
"type": "git",
|
|
16
|
-
"url": "git+https://github.com/nemchik/biome-plugin-suitescript.git"
|
|
17
|
-
},
|
|
18
|
-
"license": "MIT",
|
|
19
|
-
"author": "Eric Nemchik",
|
|
20
|
-
"type": "module",
|
|
21
|
-
"exports": {
|
|
22
|
-
"./schema.json": "./schema.json",
|
|
23
|
-
"biome": "./biome-manifest.json"
|
|
24
|
-
},
|
|
25
|
-
"bin": {
|
|
26
|
-
"biome-plugin-suitescript": "./dist/bin/biome-plugin-suitescript.js"
|
|
27
|
-
},
|
|
28
|
-
"files": [
|
|
29
|
-
"biome-manifest.json",
|
|
30
|
-
"configs",
|
|
31
|
-
"dist",
|
|
32
|
-
"schema.json",
|
|
33
|
-
"README.md",
|
|
34
|
-
"LICENSE"
|
|
35
|
-
],
|
|
36
|
-
"scripts": {
|
|
37
|
-
"prebuild": "node -e \"require(\\\"node:fs\\\").rmSync(\\\"dist\\\",{recursive:true,force:true})\"",
|
|
38
|
-
"build": "tsc -p tsconfig.build.json && node scripts/build-manifest.ts",
|
|
39
|
-
"check": "biome check",
|
|
40
|
-
"preformat": "npm run typecheck",
|
|
41
|
-
"format": "biome check --write",
|
|
42
|
-
"lint": "biome lint",
|
|
43
|
-
"prepack": "npm run build",
|
|
44
|
-
"sync-modules": "node scripts/sync-modules.ts",
|
|
45
|
-
"pretest": "npm run build",
|
|
46
|
-
"test": "node --test test/*.test.ts",
|
|
47
|
-
"typecheck": "tsc"
|
|
48
|
-
},
|
|
49
|
-
"dependencies": {
|
|
50
|
-
"oxc-parser": "^0.156.0",
|
|
51
|
-
"tinyglobby": "^0.2.17"
|
|
52
|
-
},
|
|
53
|
-
"devDependencies": {
|
|
54
|
-
"@biomejs/biome": "2.6.4",
|
|
55
|
-
"@biomejs/runtime": "2.6.4",
|
|
56
|
-
"@hitc/netsuite-types": "2026.2.4",
|
|
57
|
-
"@types/node": "24.19.2",
|
|
58
|
-
"git-pull-run": "2.1.0",
|
|
59
|
-
"lefthook": "2.2.2",
|
|
60
|
-
"typescript": "7.0.2"
|
|
61
|
-
},
|
|
62
|
-
"peerDependencies": {
|
|
63
|
-
"@biomejs/biome": "^2.6.4"
|
|
64
|
-
},
|
|
65
|
-
"engines": {
|
|
66
|
-
"node": ">=24"
|
|
67
|
-
},
|
|
68
|
-
"devEngines": {
|
|
69
|
-
"runtime": {
|
|
70
|
-
"name": "node",
|
|
71
|
-
"version": "24.22.2",
|
|
72
|
-
"onFail": "error"
|
|
73
|
-
},
|
|
74
|
-
"packageManager": {
|
|
75
|
-
"name": "npm",
|
|
76
|
-
"version": "12.2.1",
|
|
77
|
-
"onFail": "warn"
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
"allowScripts": {
|
|
81
|
-
"lefthook": true
|
|
82
|
-
}
|
|
83
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "biome-plugin-suitescript",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Biome lint plugins and a tag checker for NetSuite SuiteScript 2.1, ported from eslint-plugin-suitescript.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"biome-plugin",
|
|
7
|
+
"biome",
|
|
8
|
+
"suitescript",
|
|
9
|
+
"netsuite",
|
|
10
|
+
"lint"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://github.com/nemchik/biome-plugin-suitescript#readme",
|
|
13
|
+
"bugs": "https://github.com/nemchik/biome-plugin-suitescript/issues",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/nemchik/biome-plugin-suitescript.git"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"author": "Eric Nemchik",
|
|
20
|
+
"type": "module",
|
|
21
|
+
"exports": {
|
|
22
|
+
"./schema.json": "./schema.json",
|
|
23
|
+
"biome": "./biome-manifest.json"
|
|
24
|
+
},
|
|
25
|
+
"bin": {
|
|
26
|
+
"biome-plugin-suitescript": "./dist/bin/biome-plugin-suitescript.js"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"biome-manifest.json",
|
|
30
|
+
"configs",
|
|
31
|
+
"dist",
|
|
32
|
+
"schema.json",
|
|
33
|
+
"README.md",
|
|
34
|
+
"LICENSE"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"prebuild": "node -e \"require(\\\"node:fs\\\").rmSync(\\\"dist\\\",{recursive:true,force:true})\"",
|
|
38
|
+
"build": "tsc -p tsconfig.build.json && node scripts/build-manifest.ts",
|
|
39
|
+
"check": "biome check",
|
|
40
|
+
"preformat": "npm run typecheck",
|
|
41
|
+
"format": "biome check --write",
|
|
42
|
+
"lint": "biome lint",
|
|
43
|
+
"prepack": "npm run build",
|
|
44
|
+
"sync-modules": "node scripts/sync-modules.ts",
|
|
45
|
+
"pretest": "npm run build",
|
|
46
|
+
"test": "node --test test/*.test.ts",
|
|
47
|
+
"typecheck": "tsc"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"oxc-parser": "^0.156.0",
|
|
51
|
+
"tinyglobby": "^0.2.17"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@biomejs/biome": "2.6.4",
|
|
55
|
+
"@biomejs/runtime": "2.6.4",
|
|
56
|
+
"@hitc/netsuite-types": "2026.2.4",
|
|
57
|
+
"@types/node": "24.19.2",
|
|
58
|
+
"git-pull-run": "2.1.0",
|
|
59
|
+
"lefthook": "2.2.2",
|
|
60
|
+
"typescript": "7.0.2"
|
|
61
|
+
},
|
|
62
|
+
"peerDependencies": {
|
|
63
|
+
"@biomejs/biome": "^2.6.4"
|
|
64
|
+
},
|
|
65
|
+
"engines": {
|
|
66
|
+
"node": ">=24"
|
|
67
|
+
},
|
|
68
|
+
"devEngines": {
|
|
69
|
+
"runtime": {
|
|
70
|
+
"name": "node",
|
|
71
|
+
"version": "24.22.2",
|
|
72
|
+
"onFail": "error"
|
|
73
|
+
},
|
|
74
|
+
"packageManager": {
|
|
75
|
+
"name": "npm",
|
|
76
|
+
"version": "12.2.1",
|
|
77
|
+
"onFail": "warn"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"allowScripts": {
|
|
81
|
+
"lefthook": true
|
|
82
|
+
}
|
|
83
|
+
}
|
package/schema.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$id": "https://github.com/nemchik/biome-plugin-suitescript/schema.json",
|
|
3
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
-
"additionalProperties": false,
|
|
5
|
-
"description": "Configuration for the `biome-plugin-suitescript check` command.",
|
|
6
|
-
"properties": {
|
|
7
|
-
"$schema": { "type": "string" },
|
|
8
|
-
"includes": {
|
|
9
|
-
"description": "Glob patterns of SuiteScript source files to check: files deployed to the file cabinet, or the sources they are transpiled from (not the transpiled output). Prefix a pattern with ! to exclude, as in Biome's `includes`.",
|
|
10
|
-
"examples": [
|
|
11
|
-
["src/TypeScripts/**/*.{js,ts}", "!**/*.d.ts", "!**/*.test.*"]
|
|
12
|
-
],
|
|
13
|
-
"items": { "minLength": 1, "type": "string" },
|
|
14
|
-
"minItems": 1,
|
|
15
|
-
"type": "array"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"required": ["includes"],
|
|
19
|
-
"title": "biome-plugin-suitescript configuration",
|
|
20
|
-
"type": "object"
|
|
21
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://github.com/nemchik/biome-plugin-suitescript/schema.json",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"additionalProperties": false,
|
|
5
|
+
"description": "Configuration for the `biome-plugin-suitescript check` command.",
|
|
6
|
+
"properties": {
|
|
7
|
+
"$schema": { "type": "string" },
|
|
8
|
+
"includes": {
|
|
9
|
+
"description": "Glob patterns of SuiteScript source files to check: files deployed to the file cabinet, or the sources they are transpiled from (not the transpiled output). Prefix a pattern with ! to exclude, as in Biome's `includes`.",
|
|
10
|
+
"examples": [
|
|
11
|
+
["src/TypeScripts/**/*.{js,ts}", "!**/*.d.ts", "!**/*.test.*"]
|
|
12
|
+
],
|
|
13
|
+
"items": { "minLength": 1, "type": "string" },
|
|
14
|
+
"minItems": 1,
|
|
15
|
+
"type": "array"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": ["includes"],
|
|
19
|
+
"title": "biome-plugin-suitescript configuration",
|
|
20
|
+
"type": "object"
|
|
21
|
+
}
|