@cloudalgo/eslint-plugin-apex 0.1.5
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 +28 -0
- package/dist/adapter.d.ts +11 -0
- package/dist/adapter.js +74 -0
- package/dist/adapter.js.map +1 -0
- package/dist/index.d.ts +68 -0
- package/dist/index.js +77 -0
- package/dist/index.js.map +1 -0
- package/package.json +47 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024, CloudAlgo
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Rule } from "@cloudalgo/apex-core";
|
|
2
|
+
import type { MetadataProvider } from "@cloudalgo/apex-core";
|
|
3
|
+
/**
|
|
4
|
+
* Wrap one apex-core Rule into an ESLint Rule.
|
|
5
|
+
*
|
|
6
|
+
* Key design: ESLint traverses the converted ESTree (ApexNode with `body`
|
|
7
|
+
* children), but our handlers need the original ANTLR context. The ESTree
|
|
8
|
+
* nodes carry `_antlr`; we unwrap it before dispatching to rule handlers.
|
|
9
|
+
* This lets all 15 rules run unchanged — they never know they're inside ESLint.
|
|
10
|
+
*/
|
|
11
|
+
export declare function toEslintRule(apexRule: Rule, getMetadata: () => MetadataProvider): any;
|
package/dist/adapter.js
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
const SEV_TO_ESLINT = {
|
|
2
|
+
critical: "error",
|
|
3
|
+
high: "error",
|
|
4
|
+
moderate: "warn",
|
|
5
|
+
low: "warn",
|
|
6
|
+
info: "warn",
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Wrap one apex-core Rule into an ESLint Rule.
|
|
10
|
+
*
|
|
11
|
+
* Key design: ESLint traverses the converted ESTree (ApexNode with `body`
|
|
12
|
+
* children), but our handlers need the original ANTLR context. The ESTree
|
|
13
|
+
* nodes carry `_antlr`; we unwrap it before dispatching to rule handlers.
|
|
14
|
+
* This lets all 15 rules run unchanged — they never know they're inside ESLint.
|
|
15
|
+
*/
|
|
16
|
+
export function toEslintRule(apexRule, getMetadata) {
|
|
17
|
+
return {
|
|
18
|
+
meta: {
|
|
19
|
+
type: "suggestion",
|
|
20
|
+
docs: {
|
|
21
|
+
description: apexRule.description,
|
|
22
|
+
category: apexRule.category,
|
|
23
|
+
recommended: true,
|
|
24
|
+
url: `https://github.com/cloudalgo/apex-lint#${apexRule.id.toLowerCase()}`,
|
|
25
|
+
},
|
|
26
|
+
schema: [],
|
|
27
|
+
messages: {
|
|
28
|
+
apex: "{{ message }}",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
create(context) {
|
|
32
|
+
const filename = context.getFilename?.() ?? context.filename ?? "";
|
|
33
|
+
const ruleCtx = {
|
|
34
|
+
filePath: filename,
|
|
35
|
+
source: context.getSourceCode?.()?.getText?.() ?? "",
|
|
36
|
+
metadata: getMetadata(),
|
|
37
|
+
report(antlrNode, message) {
|
|
38
|
+
const line = antlrNode?.start?.line ?? 1;
|
|
39
|
+
const col = antlrNode?.start?.column ?? 0;
|
|
40
|
+
context.report({
|
|
41
|
+
// ESLint needs at least a loc or node; we use loc directly so
|
|
42
|
+
// position comes from the ANTLR token, not the ESTree wrapper.
|
|
43
|
+
loc: {
|
|
44
|
+
start: { line, column: col },
|
|
45
|
+
end: {
|
|
46
|
+
line: antlrNode?.stop?.line ?? line,
|
|
47
|
+
column: (antlrNode?.stop?.column ?? col) +
|
|
48
|
+
(antlrNode?.stop?.text?.length ?? 1),
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
messageId: "apex",
|
|
52
|
+
data: { message },
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
// Our rule returns listeners keyed by ANTLR context type name.
|
|
57
|
+
// ESLint dispatches by the node's `type` property — which we set to the
|
|
58
|
+
// ANTLR constructor name in the parser. So the keys match directly.
|
|
59
|
+
const apexListeners = apexRule.create(ruleCtx);
|
|
60
|
+
const eslintListeners = {};
|
|
61
|
+
for (const [nodeType, handler] of Object.entries(apexListeners)) {
|
|
62
|
+
if (!handler)
|
|
63
|
+
continue;
|
|
64
|
+
eslintListeners[nodeType] = (esNode) => {
|
|
65
|
+
// Unwrap the ANTLR context stored during parse
|
|
66
|
+
const antlrNode = esNode._antlr ?? esNode;
|
|
67
|
+
handler(antlrNode);
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
return eslintListeners;
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAGA,MAAM,aAAa,GAAuC;IACxD,QAAQ,EAAE,OAAO;IACjB,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,MAAM;IAChB,GAAG,EAAE,MAAM;IACX,IAAI,EAAE,MAAM;CACb,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAC1B,QAAc,EACd,WAAmC;IAEnC,OAAO;QACL,IAAI,EAAE;YACJ,IAAI,EAAE,YAAY;YAClB,IAAI,EAAE;gBACJ,WAAW,EAAE,QAAQ,CAAC,WAAW;gBACjC,QAAQ,EAAE,QAAQ,CAAC,QAAQ;gBAC3B,WAAW,EAAE,IAAI;gBACjB,GAAG,EAAE,0CAA0C,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,EAAE;aAC3E;YACD,MAAM,EAAE,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,eAAe;aACtB;SACF;QAED,MAAM,CAAC,OAAY;YACjB,MAAM,QAAQ,GACZ,OAAO,CAAC,WAAW,EAAE,EAAE,IAAI,OAAO,CAAC,QAAQ,IAAI,EAAE,CAAC;YAEpD,MAAM,OAAO,GAAgB;gBAC3B,QAAQ,EAAE,QAAQ;gBAClB,MAAM,EAAE,OAAO,CAAC,aAAa,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE;g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zB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { parse, parseForESLint, visitorKeys } from "@cloudalgo/eslint-parser-apex";
|
|
2
|
+
declare const rules: Record<string, any>;
|
|
3
|
+
declare const parser: {
|
|
4
|
+
parse: typeof parse;
|
|
5
|
+
parseForESLint: typeof parseForESLint;
|
|
6
|
+
meta: {
|
|
7
|
+
name: string;
|
|
8
|
+
version: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
declare const plugin: {
|
|
12
|
+
meta: {
|
|
13
|
+
name: string;
|
|
14
|
+
version: string;
|
|
15
|
+
};
|
|
16
|
+
/** The custom Apex parser — include in `parser:` for legacy config. */
|
|
17
|
+
parser: {
|
|
18
|
+
parse: typeof parse;
|
|
19
|
+
parseForESLint: typeof parseForESLint;
|
|
20
|
+
meta: {
|
|
21
|
+
name: string;
|
|
22
|
+
version: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
rules: Record<string, any>;
|
|
26
|
+
/**
|
|
27
|
+
* Legacy eslintrc config (ESLint v8 and below):
|
|
28
|
+
* { "extends": ["plugin:apex/recommended"] }
|
|
29
|
+
*/
|
|
30
|
+
configs: {
|
|
31
|
+
recommended: {
|
|
32
|
+
parser: string;
|
|
33
|
+
plugins: string[];
|
|
34
|
+
rules: Record<string, string>;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Flat config objects (ESLint v9+):
|
|
39
|
+
* import apex from '@cloudalgo/eslint-plugin-apex';
|
|
40
|
+
* export default [ ...apex.flatConfigs.recommended ];
|
|
41
|
+
*/
|
|
42
|
+
flatConfigs: {
|
|
43
|
+
recommended: readonly [{
|
|
44
|
+
readonly files: readonly ["**/*.cls", "**/*.trigger"];
|
|
45
|
+
readonly languageOptions: {
|
|
46
|
+
readonly parser: {
|
|
47
|
+
parse: typeof parse;
|
|
48
|
+
parseForESLint: typeof parseForESLint;
|
|
49
|
+
meta: {
|
|
50
|
+
name: string;
|
|
51
|
+
version: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
readonly parserOptions: {
|
|
55
|
+
readonly sourceType: "module";
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
readonly plugins: {
|
|
59
|
+
readonly apex: {
|
|
60
|
+
readonly rules: Record<string, any>;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
readonly rules: Record<string, string>;
|
|
64
|
+
}];
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
export default plugin;
|
|
68
|
+
export { plugin, rules, parser, visitorKeys };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { resolve } from "node:path";
|
|
2
|
+
import { allRules, FilesystemMetadataProvider, NullMetadataProvider, } from "@cloudalgo/apex-core";
|
|
3
|
+
import { parse, parseForESLint, visitorKeys } from "@cloudalgo/eslint-parser-apex";
|
|
4
|
+
import { toEslintRule } from "./adapter.js";
|
|
5
|
+
// ─── Metadata provider ────────────────────────────────────────────────────────
|
|
6
|
+
// Rules that need SObject names (UnguardedCrudOperation) read metadataRoot
|
|
7
|
+
// from the plugin's shared settings or fall back to cwd.
|
|
8
|
+
function makeMetadataGetter(settings) {
|
|
9
|
+
let cached = null;
|
|
10
|
+
return () => {
|
|
11
|
+
if (cached)
|
|
12
|
+
return cached;
|
|
13
|
+
const root = settings?.["apex/metadataRoot"] ??
|
|
14
|
+
settings?.["apexMetadataRoot"];
|
|
15
|
+
cached = root
|
|
16
|
+
? new FilesystemMetadataProvider([resolve(root)])
|
|
17
|
+
: new NullMetadataProvider();
|
|
18
|
+
return cached;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
// ─── Rules ────────────────────────────────────────────────────────────────────
|
|
22
|
+
const rules = {};
|
|
23
|
+
for (const rule of allRules) {
|
|
24
|
+
// Use a lazy metadata getter — we don't have ESLint context at module load time
|
|
25
|
+
rules[rule.id] = toEslintRule(rule, makeMetadataGetter());
|
|
26
|
+
}
|
|
27
|
+
// ─── Parser re-export ─────────────────────────────────────────────────────────
|
|
28
|
+
// Including the parser in the plugin lets users configure with just the plugin.
|
|
29
|
+
const parser = { parse, parseForESLint, meta: { name: "@cloudalgo/eslint-parser-apex", version: "0.1.0" } };
|
|
30
|
+
// ─── Recommended rule config ──────────────────────────────────────────────────
|
|
31
|
+
const recommendedRules = {};
|
|
32
|
+
for (const rule of allRules) {
|
|
33
|
+
const level = rule.severity === "critical" || rule.severity === "high" ? "error" : "warn";
|
|
34
|
+
recommendedRules[`apex/${rule.id}`] = level;
|
|
35
|
+
}
|
|
36
|
+
// ─── Plugin export (legacy + flat config) ─────────────────────────────────────
|
|
37
|
+
const plugin = {
|
|
38
|
+
meta: {
|
|
39
|
+
name: "@cloudalgo/eslint-plugin-apex",
|
|
40
|
+
version: "0.1.0",
|
|
41
|
+
},
|
|
42
|
+
/** The custom Apex parser — include in `parser:` for legacy config. */
|
|
43
|
+
parser,
|
|
44
|
+
rules,
|
|
45
|
+
/**
|
|
46
|
+
* Legacy eslintrc config (ESLint v8 and below):
|
|
47
|
+
* { "extends": ["plugin:apex/recommended"] }
|
|
48
|
+
*/
|
|
49
|
+
configs: {
|
|
50
|
+
recommended: {
|
|
51
|
+
parser: "@cloudalgo/eslint-parser-apex",
|
|
52
|
+
plugins: ["apex"],
|
|
53
|
+
rules: recommendedRules,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
/**
|
|
57
|
+
* Flat config objects (ESLint v9+):
|
|
58
|
+
* import apex from '@cloudalgo/eslint-plugin-apex';
|
|
59
|
+
* export default [ ...apex.flatConfigs.recommended ];
|
|
60
|
+
*/
|
|
61
|
+
flatConfigs: {
|
|
62
|
+
recommended: [
|
|
63
|
+
{
|
|
64
|
+
files: ["**/*.cls", "**/*.trigger"],
|
|
65
|
+
languageOptions: {
|
|
66
|
+
parser,
|
|
67
|
+
parserOptions: { sourceType: "module" },
|
|
68
|
+
},
|
|
69
|
+
plugins: { apex: { rules } },
|
|
70
|
+
rules: recommendedRules,
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
export default plugin;
|
|
76
|
+
export { plugin, rules, parser, visitorKeys };
|
|
77
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,QAAQ,EACR,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,iFAAiF;AACjF,2EAA2E;AAC3E,yDAAyD;AAEzD,SAAS,kBAAkB,CAAC,QAAkC;IAC5D,IAAI,MAAM,GAA6D,IAAI,CAAC;IAC5E,OAAO,GAAG,EAAE;QACV,IAAI,MAAM;YAAE,OAAO,MAAM,CAAC;QAC1B,MAAM,IAAI,GACP,QAAQ,EAAE,CAAC,mBAAmB,CAAwB;YACtD,QAAQ,EAAE,CAAC,kBAAkB,CAAwB,CAAC;QACzD,MAAM,GAAG,IAAI;YACX,CAAC,CAAC,IAAI,0BAA0B,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YACjD,CAAC,CAAC,IAAI,oBAAoB,EAAE,CAAC;QAC/B,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC;AAED,iFAAiF;AAEjF,MAAM,KAAK,GAAwB,EAAE,CAAC;AACtC,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;IAC5B,gFAAgF;IAChF,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,IAA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,WAAW,EAAE,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cloudalgo/eslint-plugin-apex",
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"description": "ESLint plugin for Salesforce Apex — 15 rules for SOQL injection, governor limits, security and code quality",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@cloudalgo/apex-core": "0.1.5",
|
|
16
|
+
"@cloudalgo/eslint-parser-apex": "0.1.5"
|
|
17
|
+
},
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"eslint": ">=8.0.0"
|
|
20
|
+
},
|
|
21
|
+
"license": "BSD-3-Clause",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://github.com/cloudalgo/apex-lint"
|
|
25
|
+
},
|
|
26
|
+
"homepage": "https://github.com/cloudalgo/apex-lint#readme",
|
|
27
|
+
"bugs": {
|
|
28
|
+
"url": "https://github.com/cloudalgo/apex-lint/issues"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"salesforce",
|
|
32
|
+
"apex",
|
|
33
|
+
"eslint",
|
|
34
|
+
"eslint-plugin",
|
|
35
|
+
"lint",
|
|
36
|
+
"static-analysis"
|
|
37
|
+
],
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=20"
|
|
40
|
+
},
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "tsc -p tsconfig.json"
|
|
46
|
+
}
|
|
47
|
+
}
|