eslint-plugin-sdl-2 1.2.2 → 1.2.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/dist/_internal/ast-utils.d.ts.map +1 -1
- package/dist/_internal/ast-utils.js +9 -8
- package/dist/_internal/ast-utils.js.map +1 -1
- package/dist/_internal/create-rule.d.ts +3 -1
- package/dist/_internal/create-rule.d.ts.map +1 -1
- package/dist/_internal/create-rule.js +5 -1
- package/dist/_internal/create-rule.js.map +1 -1
- package/dist/_internal/domparser.d.ts.map +1 -1
- package/dist/_internal/domparser.js +8 -7
- package/dist/_internal/domparser.js.map +1 -1
- package/dist/_internal/electron-web-preferences.d.ts.map +1 -1
- package/dist/_internal/electron-web-preferences.js +12 -10
- package/dist/_internal/electron-web-preferences.js.map +1 -1
- package/dist/_internal/estree-utils.d.ts.map +1 -1
- package/dist/_internal/estree-utils.js +17 -15
- package/dist/_internal/estree-utils.js.map +1 -1
- package/dist/_internal/node-tls-config.d.ts.map +1 -1
- package/dist/_internal/node-tls-config.js +9 -8
- package/dist/_internal/node-tls-config.js.map +1 -1
- package/dist/_internal/rules-registry.d.ts.map +1 -1
- package/dist/_internal/rules-registry.js +142 -143
- package/dist/_internal/rules-registry.js.map +1 -1
- package/dist/_internal/script-element.d.ts.map +1 -1
- package/dist/_internal/script-element.js +6 -5
- package/dist/_internal/script-element.js.map +1 -1
- package/dist/_internal/worker-code-loading.d.ts.map +1 -1
- package/dist/_internal/worker-code-loading.js +18 -17
- package/dist/_internal/worker-code-loading.js.map +1 -1
- package/dist/plugin.cjs +579 -497
- package/dist/plugin.cjs.map +4 -4
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +38 -21
- package/dist/plugin.js.map +1 -1
- package/dist/rules/no-angular-bypass-security-trust-html.d.ts.map +1 -1
- package/dist/rules/no-angular-bypass-security-trust-html.js +4 -3
- package/dist/rules/no-angular-bypass-security-trust-html.js.map +1 -1
- package/dist/rules/no-angular-innerhtml-binding.js +1 -1
- package/dist/rules/no-angularjs-bypass-sce.d.ts.map +1 -1
- package/dist/rules/no-angularjs-bypass-sce.js +5 -4
- package/dist/rules/no-angularjs-bypass-sce.js.map +1 -1
- package/dist/rules/no-angularjs-enable-svg.d.ts.map +1 -1
- package/dist/rules/no-angularjs-enable-svg.js +2 -1
- package/dist/rules/no-angularjs-enable-svg.js.map +1 -1
- package/dist/rules/no-angularjs-ng-bind-html-without-sanitize.js +2 -2
- package/dist/rules/no-angularjs-sce-resource-url-wildcard.d.ts.map +1 -1
- package/dist/rules/no-angularjs-sce-resource-url-wildcard.js +8 -7
- package/dist/rules/no-angularjs-sce-resource-url-wildcard.js.map +1 -1
- package/dist/rules/no-child-process-exec.d.ts.map +1 -1
- package/dist/rules/no-child-process-exec.js +21 -17
- package/dist/rules/no-child-process-exec.js.map +1 -1
- package/dist/rules/no-child-process-shell-true.d.ts.map +1 -1
- package/dist/rules/no-child-process-shell-true.js +12 -10
- package/dist/rules/no-child-process-shell-true.js.map +1 -1
- package/dist/rules/no-document-domain.d.ts.map +1 -1
- package/dist/rules/no-document-domain.js +2 -1
- package/dist/rules/no-document-domain.js.map +1 -1
- package/dist/rules/no-document-execcommand-insert-html.d.ts.map +1 -1
- package/dist/rules/no-document-execcommand-insert-html.js +4 -3
- package/dist/rules/no-document-execcommand-insert-html.js.map +1 -1
- package/dist/rules/no-document-parse-html-unsafe.d.ts.map +1 -1
- package/dist/rules/no-document-parse-html-unsafe.js +6 -5
- package/dist/rules/no-document-parse-html-unsafe.js.map +1 -1
- package/dist/rules/no-document-write.d.ts.map +1 -1
- package/dist/rules/no-document-write.js +2 -1
- package/dist/rules/no-document-write.js.map +1 -1
- package/dist/rules/no-domparser-html-without-sanitization.d.ts.map +1 -1
- package/dist/rules/no-domparser-html-without-sanitization.js +3 -2
- package/dist/rules/no-domparser-html-without-sanitization.js.map +1 -1
- package/dist/rules/no-domparser-svg-without-sanitization.d.ts.map +1 -1
- package/dist/rules/no-domparser-svg-without-sanitization.js +3 -2
- package/dist/rules/no-domparser-svg-without-sanitization.js.map +1 -1
- package/dist/rules/no-dynamic-import-unsafe-url.js +1 -1
- package/dist/rules/no-electron-dangerous-blink-features.d.ts.map +1 -1
- package/dist/rules/no-electron-dangerous-blink-features.js +14 -11
- package/dist/rules/no-electron-dangerous-blink-features.js.map +1 -1
- package/dist/rules/no-electron-expose-raw-ipc-renderer.d.ts.map +1 -1
- package/dist/rules/no-electron-expose-raw-ipc-renderer.js +19 -18
- package/dist/rules/no-electron-expose-raw-ipc-renderer.js.map +1 -1
- package/dist/rules/no-electron-insecure-certificate-error-handler.d.ts.map +1 -1
- package/dist/rules/no-electron-insecure-certificate-error-handler.js +15 -9
- package/dist/rules/no-electron-insecure-certificate-error-handler.js.map +1 -1
- package/dist/rules/no-electron-insecure-certificate-verify-proc.d.ts.map +1 -1
- package/dist/rules/no-electron-insecure-certificate-verify-proc.js +12 -8
- package/dist/rules/no-electron-insecure-certificate-verify-proc.js.map +1 -1
- package/dist/rules/no-electron-insecure-permission-request-handler.d.ts.map +1 -1
- package/dist/rules/no-electron-insecure-permission-request-handler.js +12 -8
- package/dist/rules/no-electron-insecure-permission-request-handler.js.map +1 -1
- package/dist/rules/no-electron-permission-check-handler-allow-all.d.ts.map +1 -1
- package/dist/rules/no-electron-permission-check-handler-allow-all.js +8 -7
- package/dist/rules/no-electron-permission-check-handler-allow-all.js.map +1 -1
- package/dist/rules/no-electron-unchecked-ipc-sender.d.ts.map +1 -1
- package/dist/rules/no-electron-unchecked-ipc-sender.js +14 -10
- package/dist/rules/no-electron-unchecked-ipc-sender.js.map +1 -1
- package/dist/rules/no-electron-unrestricted-navigation.d.ts.map +1 -1
- package/dist/rules/no-electron-unrestricted-navigation.js +15 -11
- package/dist/rules/no-electron-unrestricted-navigation.js.map +1 -1
- package/dist/rules/no-electron-untrusted-open-external.d.ts.map +1 -1
- package/dist/rules/no-electron-untrusted-open-external.js +11 -9
- package/dist/rules/no-electron-untrusted-open-external.js.map +1 -1
- package/dist/rules/no-electron-webview-allowpopups.d.ts.map +1 -1
- package/dist/rules/no-electron-webview-allowpopups.js +7 -6
- package/dist/rules/no-electron-webview-allowpopups.js.map +1 -1
- package/dist/rules/no-electron-webview-insecure-webpreferences.d.ts.map +1 -1
- package/dist/rules/no-electron-webview-insecure-webpreferences.js +9 -8
- package/dist/rules/no-electron-webview-insecure-webpreferences.js.map +1 -1
- package/dist/rules/no-electron-webview-node-integration.d.ts.map +1 -1
- package/dist/rules/no-electron-webview-node-integration.js +9 -8
- package/dist/rules/no-electron-webview-node-integration.js.map +1 -1
- package/dist/rules/no-html-method.d.ts.map +1 -1
- package/dist/rules/no-html-method.js +3 -2
- package/dist/rules/no-html-method.js.map +1 -1
- package/dist/rules/no-http-request-to-insecure-protocol.d.ts.map +1 -1
- package/dist/rules/no-http-request-to-insecure-protocol.js +13 -10
- package/dist/rules/no-http-request-to-insecure-protocol.js.map +1 -1
- package/dist/rules/no-iframe-srcdoc.d.ts.map +1 -1
- package/dist/rules/no-iframe-srcdoc.js +13 -12
- package/dist/rules/no-iframe-srcdoc.js.map +1 -1
- package/dist/rules/no-inner-html.d.ts.map +1 -1
- package/dist/rules/no-inner-html.js +5 -4
- package/dist/rules/no-inner-html.js.map +1 -1
- package/dist/rules/no-insecure-random.d.ts.map +1 -1
- package/dist/rules/no-insecure-random.js +12 -10
- package/dist/rules/no-insecure-random.js.map +1 -1
- package/dist/rules/no-insecure-tls-agent-options.d.ts.map +1 -1
- package/dist/rules/no-insecure-tls-agent-options.js +10 -9
- package/dist/rules/no-insecure-tls-agent-options.js.map +1 -1
- package/dist/rules/no-insecure-url.d.ts.map +1 -1
- package/dist/rules/no-insecure-url.js +11 -10
- package/dist/rules/no-insecure-url.js.map +1 -1
- package/dist/rules/no-location-javascript-url.d.ts.map +1 -1
- package/dist/rules/no-location-javascript-url.js +11 -8
- package/dist/rules/no-location-javascript-url.js.map +1 -1
- package/dist/rules/no-message-event-without-origin-check.d.ts.map +1 -1
- package/dist/rules/no-message-event-without-origin-check.js +25 -29
- package/dist/rules/no-message-event-without-origin-check.js.map +1 -1
- package/dist/rules/no-node-tls-check-server-identity-bypass.d.ts.map +1 -1
- package/dist/rules/no-node-tls-check-server-identity-bypass.js +14 -13
- package/dist/rules/no-node-tls-check-server-identity-bypass.js.map +1 -1
- package/dist/rules/no-node-tls-legacy-protocol.d.ts.map +1 -1
- package/dist/rules/no-node-tls-legacy-protocol.js +6 -5
- package/dist/rules/no-node-tls-legacy-protocol.js.map +1 -1
- package/dist/rules/no-node-tls-reject-unauthorized-zero.d.ts.map +1 -1
- package/dist/rules/no-node-tls-reject-unauthorized-zero.js +11 -8
- package/dist/rules/no-node-tls-reject-unauthorized-zero.js.map +1 -1
- package/dist/rules/no-node-tls-security-level-zero.d.ts.map +1 -1
- package/dist/rules/no-node-tls-security-level-zero.js +6 -5
- package/dist/rules/no-node-tls-security-level-zero.js.map +1 -1
- package/dist/rules/no-node-vm-run-in-context.d.ts.map +1 -1
- package/dist/rules/no-node-vm-run-in-context.js +25 -21
- package/dist/rules/no-node-vm-run-in-context.js.map +1 -1
- package/dist/rules/no-node-vm-source-text-module.d.ts.map +1 -1
- package/dist/rules/no-node-vm-source-text-module.js +21 -17
- package/dist/rules/no-node-vm-source-text-module.js.map +1 -1
- package/dist/rules/no-node-worker-threads-eval.d.ts.map +1 -1
- package/dist/rules/no-node-worker-threads-eval.js +26 -21
- package/dist/rules/no-node-worker-threads-eval.js.map +1 -1
- package/dist/rules/no-nonnull-assertion-on-security-input.d.ts.map +1 -1
- package/dist/rules/no-nonnull-assertion-on-security-input.js +5 -4
- package/dist/rules/no-nonnull-assertion-on-security-input.js.map +1 -1
- package/dist/rules/no-postmessage-star-origin.d.ts.map +1 -1
- package/dist/rules/no-postmessage-star-origin.js +3 -2
- package/dist/rules/no-postmessage-star-origin.js.map +1 -1
- package/dist/rules/no-postmessage-without-origin-allowlist.d.ts.map +1 -1
- package/dist/rules/no-postmessage-without-origin-allowlist.js +10 -7
- package/dist/rules/no-postmessage-without-origin-allowlist.js.map +1 -1
- package/dist/rules/no-range-create-contextual-fragment.d.ts.map +1 -1
- package/dist/rules/no-range-create-contextual-fragment.js +8 -7
- package/dist/rules/no-range-create-contextual-fragment.js.map +1 -1
- package/dist/rules/no-script-src-data-url.d.ts.map +1 -1
- package/dist/rules/no-script-src-data-url.js +9 -8
- package/dist/rules/no-script-src-data-url.js.map +1 -1
- package/dist/rules/no-script-text.d.ts.map +1 -1
- package/dist/rules/no-script-text.js +2 -1
- package/dist/rules/no-script-text.js.map +1 -1
- package/dist/rules/no-service-worker-unsafe-script-url.d.ts.map +1 -1
- package/dist/rules/no-service-worker-unsafe-script-url.js +3 -2
- package/dist/rules/no-service-worker-unsafe-script-url.js.map +1 -1
- package/dist/rules/no-set-html-unsafe.d.ts.map +1 -1
- package/dist/rules/no-set-html-unsafe.js +3 -2
- package/dist/rules/no-set-html-unsafe.js.map +1 -1
- package/dist/rules/no-trusted-types-policy-pass-through.d.ts.map +1 -1
- package/dist/rules/no-trusted-types-policy-pass-through.js +19 -18
- package/dist/rules/no-trusted-types-policy-pass-through.js.map +1 -1
- package/dist/rules/no-unsafe-alloc.d.ts.map +1 -1
- package/dist/rules/no-unsafe-alloc.js +4 -3
- package/dist/rules/no-unsafe-alloc.js.map +1 -1
- package/dist/rules/no-unsafe-cast-to-trusted-types.d.ts.map +1 -1
- package/dist/rules/no-unsafe-cast-to-trusted-types.js +8 -7
- package/dist/rules/no-unsafe-cast-to-trusted-types.js.map +1 -1
- package/dist/rules/no-window-open-without-noopener.d.ts.map +1 -1
- package/dist/rules/no-window-open-without-noopener.js +10 -7
- package/dist/rules/no-window-open-without-noopener.js.map +1 -1
- package/dist/rules/no-worker-blob-url.d.ts.map +1 -1
- package/dist/rules/no-worker-blob-url.js +3 -2
- package/dist/rules/no-worker-blob-url.js.map +1 -1
- package/dist/rules/no-worker-data-url.d.ts.map +1 -1
- package/dist/rules/no-worker-data-url.js +3 -2
- package/dist/rules/no-worker-data-url.js.map +1 -1
- package/package.json +38 -39
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAQ7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAMtE,KAAK,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AACzC,KAAK,cAAc,GAAG,SAAS,SAAS,EAAE,CAAC;AAG3C,KAAK,oBAAoB,GAAG,MAAM,CAAC,MAAM,GAAG;IACxC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAC;CACrE,CAAC;AAsRF,0EAA0E;AAC1E,QAAA,MAAM,SAAS,EAAE,oBAIhB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
package/dist/plugin.js
CHANGED
|
@@ -1,19 +1,34 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as typeScriptPluginModule from "@typescript-eslint/eslint-plugin";
|
|
2
2
|
import typeScriptParser from "@typescript-eslint/parser";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import * as nodePluginModule from "eslint-plugin-n";
|
|
4
|
+
import * as securityPluginModule from "eslint-plugin-security";
|
|
5
|
+
// eslint-disable-next-line import-x/extensions -- JSON ESM import requires explicit file extension with import attributes.
|
|
5
6
|
import packageJson from "../package.json" with { type: "json" };
|
|
6
7
|
import sdlRules from "./_internal/rules-registry.js";
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const isUnknownRecord = (value) => typeof value === "object" && value !== null;
|
|
9
|
+
const isEslintPlugin = (value) => isUnknownRecord(value);
|
|
10
|
+
const resolvePlugin = (pluginModule) => {
|
|
11
|
+
if (isUnknownRecord(pluginModule)) {
|
|
12
|
+
const moduleDefault = pluginModule["default"];
|
|
13
|
+
if (isEslintPlugin(moduleDefault)) {
|
|
14
|
+
return moduleDefault;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
if (isEslintPlugin(pluginModule)) {
|
|
18
|
+
return pluginModule;
|
|
19
|
+
}
|
|
20
|
+
throw new TypeError("Expected an ESLint plugin module.");
|
|
21
|
+
};
|
|
22
|
+
const typeScriptEslintPlugin = resolvePlugin(typeScriptPluginModule);
|
|
23
|
+
const nodeEslintPlugin = resolvePlugin(nodePluginModule);
|
|
24
|
+
const securityEslintPlugin = resolvePlugin(securityPluginModule);
|
|
10
25
|
const typeScriptFiles = ["**/*.{ts,tsx,mts,cts}"];
|
|
11
26
|
const createNamedConfig = (name, config = {}) => ({
|
|
12
27
|
...config,
|
|
13
28
|
name,
|
|
14
29
|
});
|
|
15
30
|
const createAngularConfig = (plugin) => [
|
|
16
|
-
createNamedConfig("SDL Angular Security", {
|
|
31
|
+
createNamedConfig("🔐 SDL: Angular Security", {
|
|
17
32
|
plugins: {
|
|
18
33
|
sdl: plugin,
|
|
19
34
|
},
|
|
@@ -26,7 +41,7 @@ const createAngularConfig = (plugin) => [
|
|
|
26
41
|
}),
|
|
27
42
|
];
|
|
28
43
|
const createAngularJsConfig = (plugin) => [
|
|
29
|
-
createNamedConfig("SDL AngularJS Security", {
|
|
44
|
+
createNamedConfig("🔐 SDL: AngularJS Security", {
|
|
30
45
|
plugins: {
|
|
31
46
|
sdl: plugin,
|
|
32
47
|
},
|
|
@@ -40,7 +55,7 @@ const createAngularJsConfig = (plugin) => [
|
|
|
40
55
|
}),
|
|
41
56
|
];
|
|
42
57
|
const createCommonConfig = (plugin) => [
|
|
43
|
-
createNamedConfig("SDL Common Web Security", {
|
|
58
|
+
createNamedConfig("🔐 SDL: Common Web Security", {
|
|
44
59
|
plugins: {
|
|
45
60
|
sdl: plugin,
|
|
46
61
|
},
|
|
@@ -81,7 +96,7 @@ const createCommonConfig = (plugin) => [
|
|
|
81
96
|
}),
|
|
82
97
|
];
|
|
83
98
|
const createElectronConfig = (plugin) => [
|
|
84
|
-
createNamedConfig("SDL Electron Security", {
|
|
99
|
+
createNamedConfig("🔐 SDL: Electron Security", {
|
|
85
100
|
plugins: {
|
|
86
101
|
sdl: plugin,
|
|
87
102
|
},
|
|
@@ -110,7 +125,7 @@ const createElectronConfig = (plugin) => [
|
|
|
110
125
|
}),
|
|
111
126
|
];
|
|
112
127
|
const createNodeConfig = (plugin) => [
|
|
113
|
-
createNamedConfig("SDL Node.js Runtime Safety", {
|
|
128
|
+
createNamedConfig("🔐 SDL: Node.js Runtime Safety", {
|
|
114
129
|
plugins: {
|
|
115
130
|
n: nodeEslintPlugin,
|
|
116
131
|
},
|
|
@@ -118,7 +133,7 @@ const createNodeConfig = (plugin) => [
|
|
|
118
133
|
"n/no-deprecated-api": "error",
|
|
119
134
|
},
|
|
120
135
|
}),
|
|
121
|
-
createNamedConfig("SDL Node.js Security", {
|
|
136
|
+
createNamedConfig("🔐 SDL: Node.js Security", {
|
|
122
137
|
plugins: {
|
|
123
138
|
sdl: plugin,
|
|
124
139
|
},
|
|
@@ -139,7 +154,7 @@ const createNodeConfig = (plugin) => [
|
|
|
139
154
|
}),
|
|
140
155
|
];
|
|
141
156
|
const createReactConfig = (plugin) => [
|
|
142
|
-
createNamedConfig("SDL React JSX Support", {
|
|
157
|
+
createNamedConfig("🔐 SDL: React JSX Support", {
|
|
143
158
|
languageOptions: {
|
|
144
159
|
parserOptions: {
|
|
145
160
|
ecmaFeatures: {
|
|
@@ -148,14 +163,14 @@ const createReactConfig = (plugin) => [
|
|
|
148
163
|
},
|
|
149
164
|
},
|
|
150
165
|
}),
|
|
151
|
-
createNamedConfig("SDL React Security", {
|
|
166
|
+
createNamedConfig("🔐 SDL: React Security", {
|
|
152
167
|
plugins: {
|
|
153
168
|
sdl: plugin,
|
|
154
169
|
},
|
|
155
170
|
}),
|
|
156
171
|
];
|
|
157
172
|
const createTypeScriptConfig = (plugin) => [
|
|
158
|
-
createNamedConfig("SDL TypeScript Parser Support", {
|
|
173
|
+
createNamedConfig("🔐 SDL: TypeScript Parser Support", {
|
|
159
174
|
languageOptions: {
|
|
160
175
|
parserOptions: {
|
|
161
176
|
ecmaVersion: "latest",
|
|
@@ -163,7 +178,7 @@ const createTypeScriptConfig = (plugin) => [
|
|
|
163
178
|
},
|
|
164
179
|
},
|
|
165
180
|
}),
|
|
166
|
-
createNamedConfig("SDL TypeScript Security", {
|
|
181
|
+
createNamedConfig("🔐 SDL: TypeScript Security", {
|
|
167
182
|
files: [...typeScriptFiles],
|
|
168
183
|
languageOptions: {
|
|
169
184
|
parser: typeScriptParser,
|
|
@@ -189,7 +204,7 @@ const createTypeScriptConfig = (plugin) => [
|
|
|
189
204
|
}),
|
|
190
205
|
];
|
|
191
206
|
const createRequiredConfig = (configs) => [
|
|
192
|
-
createNamedConfig("SDL Required Security Baseline"),
|
|
207
|
+
createNamedConfig("🔐 SDL: Required Security Baseline"),
|
|
193
208
|
...configs.angular,
|
|
194
209
|
...configs.angularjs,
|
|
195
210
|
...configs.common,
|
|
@@ -198,10 +213,10 @@ const createRequiredConfig = (configs) => [
|
|
|
198
213
|
...configs.react,
|
|
199
214
|
];
|
|
200
215
|
const createRecommendedConfig = (configs) => [
|
|
201
|
-
createNamedConfig("SDL Recommended Security Baseline"),
|
|
216
|
+
createNamedConfig("🔐 SDL: Recommended Security Baseline"),
|
|
202
217
|
...configs.required,
|
|
203
218
|
...configs.typescript,
|
|
204
|
-
createNamedConfig("SDL Recommended Security Plugins", {
|
|
219
|
+
createNamedConfig("🔐 SDL: Recommended Security Plugins", {
|
|
205
220
|
plugins: {
|
|
206
221
|
security: securityEslintPlugin,
|
|
207
222
|
},
|
|
@@ -210,13 +225,15 @@ const createRecommendedConfig = (configs) => [
|
|
|
210
225
|
const packageJsonVersion = typeof packageJson.version === "string" && packageJson.version.length > 0
|
|
211
226
|
? packageJson.version
|
|
212
227
|
: "0.0.0";
|
|
228
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Type bridge between @typescript-eslint RuleModule readonly options and ESLint plugin rule map.
|
|
229
|
+
const pluginRules = sdlRules;
|
|
213
230
|
const pluginCore = {
|
|
214
231
|
meta: {
|
|
215
232
|
name: "eslint-plugin-sdl-2",
|
|
216
233
|
namespace: "sdl",
|
|
217
234
|
version: packageJsonVersion,
|
|
218
235
|
},
|
|
219
|
-
rules:
|
|
236
|
+
rules: pluginRules,
|
|
220
237
|
};
|
|
221
238
|
const configs = {
|
|
222
239
|
angular: createAngularConfig(pluginCore),
|
|
@@ -235,7 +252,7 @@ configs.recommended = createRecommendedConfig(configs);
|
|
|
235
252
|
const sdlPlugin = {
|
|
236
253
|
...pluginCore,
|
|
237
254
|
configs,
|
|
238
|
-
rules:
|
|
255
|
+
rules: pluginRules,
|
|
239
256
|
};
|
|
240
257
|
export default sdlPlugin;
|
|
241
258
|
//# sourceMappingURL=plugin.js.map
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,sBAAsB,MAAM,kCAAkC,CAAC;AAC3E,OAAO,gBAAgB,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,gBAAgB,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,oBAAoB,MAAM,wBAAwB,CAAC;AAI/D,2HAA2H;AAC3H,OAAO,WAAW,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE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tC,QAAQ,EAAE,oBAAoB,CAAC,UAAU,CAAC;IAC1C,IAAI,EAAE,gBAAgB,CAAC,UAAU,CAAC;IAClC,KAAK,EAAE,iBAAiB,CAAC,UAAU,CAAC;IACpC,WAAW,EAAE,EAAE;IACf,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE,sBAAsB,CAAC,UAAU,CAAC;CACjD,CAAC;AAEF,OAAO,CAAC,QAAQ,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;AACjD,OAAO,CAAC,WAAW,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;AAEvD,0EAA0E;AAC1E,MAAM,SAAS,GAAyB;IACpC,GAAG,UAAU;IACb,OAAO;IACP,KAAK,EAAE,WAAW;CACrB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-angular-bypass-security-trust-html.d.ts","sourceRoot":"","sources":["../../src/rules/no-angular-bypass-security-trust-html.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"no-angular-bypass-security-trust-html.d.ts","sourceRoot":"","sources":["../../src/rules/no-angular-bypass-security-trust-html.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAwBzD,2BAA2B;AAC3B,QAAA,MAAM,IAAI,EAAE,UAAU,CAAC,OAAO,UAAU,CAuCtC,CAAC;AAEH,eAAe,IAAI,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
|
|
1
2
|
import { createRule } from "../_internal/create-rule.js";
|
|
2
3
|
const getMemberPropertyName = (memberExpression) => {
|
|
3
4
|
if (!memberExpression.computed &&
|
|
4
|
-
memberExpression.property.type ===
|
|
5
|
+
memberExpression.property.type === AST_NODE_TYPES.Identifier) {
|
|
5
6
|
return memberExpression.property.name;
|
|
6
7
|
}
|
|
7
|
-
if (memberExpression.property.type ===
|
|
8
|
+
if (memberExpression.property.type === AST_NODE_TYPES.Literal &&
|
|
8
9
|
typeof memberExpression.property.value === "string") {
|
|
9
10
|
return memberExpression.property.value;
|
|
10
11
|
}
|
|
@@ -15,7 +16,7 @@ const rule = createRule({
|
|
|
15
16
|
create(context) {
|
|
16
17
|
return {
|
|
17
18
|
CallExpression(node) {
|
|
18
|
-
if (node.callee.type !==
|
|
19
|
+
if (node.callee.type !== AST_NODE_TYPES.MemberExpression) {
|
|
19
20
|
return;
|
|
20
21
|
}
|
|
21
22
|
if (getMemberPropertyName(node.callee) !==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-angular-bypass-security-trust-html.js","sourceRoot":"","sources":["../../src/rules/no-angular-bypass-security-trust-html.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAIzD,MAAM,qBAAqB,GAAG,CAC1B,gBAA2C,EACzB,EAAE;IACpB,IACI,CAAC,gBAAgB,CAAC,QAAQ;QAC1B,gBAAgB,CAAC,QAAQ,CAAC,IAAI,KAAK,
|
|
1
|
+
{"version":3,"file":"no-angular-bypass-security-trust-html.js","sourceRoot":"","sources":["../../src/rules/no-angular-bypass-security-trust-html.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAIzD,MAAM,qBAAqB,GAAG,CAC1B,gBAA2C,EACzB,EAAE;IACpB,IACI,CAAC,gBAAgB,CAAC,QAAQ;QAC1B,gBAAgB,CAAC,QAAQ,CAAC,IAAI,KAAK,cAAc,CAAC,UAAU,EAC9D,CAAC;QACC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC1C,CAAC;IAED,IACI,gBAAgB,CAAC,QAAQ,CAAC,IAAI,KAAK,cAAc,CAAC,OAAO;QACzD,OAAO,gBAAgB,CAAC,QAAQ,CAAC,KAAK,KAAK,QAAQ,EACrD,CAAC;QACC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC;IAC3C,CAAC;IAED,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC;AAEF,2BAA2B;AAC3B,MAAM,IAAI,GAAkC,UAAU,CAAiB;IACnE,MAAM,CAAC,OAAO;QACV,OAAO;YACH,cAAc,CAAC,IAA6B;gBACxC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,cAAc,CAAC,gBAAgB,EAAE,CAAC;oBACvD,OAAO;gBACX,CAAC;gBAED,IACI,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC;oBAClC,yBAAyB,EAC3B,CAAC;oBACC,OAAO;gBACX,CAAC;gBAED,OAAO,CAAC,MAAM,CAAC;oBACX,SAAS,EAAE,SAAS;oBACpB,IAAI;iBACP,CAAC,CAAC;YACP,CAAC;SACJ,CAAC;IACN,CAAC;IACD,IAAI,EAAE;QACF,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE;YACF,WAAW,EACP,qEAAqE;YACzE,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,KAAK;YAClB,GAAG,EAAE,mGAAmG;SAC3G;QACD,QAAQ,EAAE;YACN,OAAO,EACH,4EAA4E;SACnF;QACD,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,SAAS;KAClB;IACD,IAAI,EAAE,uCAAuC;CAChD,CAAC,CAAC;AAEH,eAAe,IAAI,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { arrayFirst } from "ts-extras";
|
|
2
2
|
import { createRule } from "../_internal/create-rule.js";
|
|
3
|
-
const hasInnerHtmlBindingPattern = (text) => /\[\s*innerhtml\s*\]\s*=/
|
|
3
|
+
const hasInnerHtmlBindingPattern = (text) => /\[\s*innerhtml\s*\]\s*=/iv.test(text);
|
|
4
4
|
/** Rule implementation. */
|
|
5
5
|
const rule = createRule({
|
|
6
6
|
create(context) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-angularjs-bypass-sce.d.ts","sourceRoot":"","sources":["../../src/rules/no-angularjs-bypass-sce.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"no-angularjs-bypass-sce.d.ts","sourceRoot":"","sources":["../../src/rules/no-angularjs-bypass-sce.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAgCzD,uDAAuD;AACvD,eAAO,MAAM,wBAAwB,EAAE,UAAU,CAAC,OAAO,UAAU,CAgF7D,CAAC;AAEP,eAAe,wBAAwB,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
|
|
1
2
|
import { arrayFirst, arrayIncludes } from "ts-extras";
|
|
2
3
|
import { createRule } from "../_internal/create-rule.js";
|
|
3
|
-
const isEmptyLiteral = (argument) => argument?.type ===
|
|
4
|
-
const isSceProviderEnabledSafeLiteral = (argument) => argument?.type ===
|
|
4
|
+
const isEmptyLiteral = (argument) => argument?.type === AST_NODE_TYPES.Literal && argument.value === "";
|
|
5
|
+
const isSceProviderEnabledSafeLiteral = (argument) => argument?.type === AST_NODE_TYPES.Literal &&
|
|
5
6
|
arrayIncludes([
|
|
6
7
|
1,
|
|
7
8
|
"1",
|
|
@@ -27,8 +28,8 @@ export const noAngularjsBypassSceRule = createRule({
|
|
|
27
28
|
};
|
|
28
29
|
return {
|
|
29
30
|
"CallExpression[callee.type='MemberExpression'][callee.object.type='Identifier'][callee.object.name='$sce'][callee.property.type='Identifier']"(node) {
|
|
30
|
-
if (node.callee.type !==
|
|
31
|
-
node.callee.property.type !==
|
|
31
|
+
if (node.callee.type !== AST_NODE_TYPES.MemberExpression ||
|
|
32
|
+
node.callee.property.type !== AST_NODE_TYPES.Identifier) {
|
|
32
33
|
return;
|
|
33
34
|
}
|
|
34
35
|
if (!isBypassSceMethod(node.callee.property.name)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-angularjs-bypass-sce.js","sourceRoot":"","sources":["../../src/rules/no-angularjs-bypass-sce.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,MAAM,cAAc,GAAG,CAAC,QAAmC,EAAW,EAAE,CACpE,QAAQ,EAAE,IAAI,KAAK,
|
|
1
|
+
{"version":3,"file":"no-angularjs-bypass-sce.js","sourceRoot":"","sources":["../../src/rules/no-angularjs-bypass-sce.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,MAAM,cAAc,GAAG,CAAC,QAAmC,EAAW,EAAE,CACpE,QAAQ,EAAE,IAAI,KAAK,cAAc,CAAC,OAAO,IAAI,QAAQ,CAAC,KAAK,KAAK,EAAE,CAAC;AAEvE,MAAM,+BAA+B,GAAG,CACpC,QAAmC,EAC5B,EAAE,CACT,QAAQ,EAAE,IAAI,KAAK,cAAc,CAAC,OAAO;IACzC,aAAa,CACT;QACI,CAAC;QACD,GAAG;QACH,IAAI;QACJ,MAAM;KACT,EACD,QAAQ,CAAC,KAAK,CACjB,CAAC;AAEN,MAAM,iBAAiB,GAAG,CAAC,UAAkB,EAAW,EAAE,CACtD,aAAa,CACT;IACI,SAAS;IACT,YAAY;IACZ,aAAa;IACb,WAAW;IACX,oBAAoB;IACpB,YAAY;CACf,EACD,UAAU,CACb,CAAC;AAEN,uDAAuD;AACvD,MAAM,CAAC,MAAM,wBAAwB,GACjC,UAAU,CAAoB;IAC1B,MAAM,CAAC,OAAO;QACV,MAAM,MAAM,GAAG,CAAC,IAA6B,EAAQ,EAAE;YACnD,OAAO,CAAC,MAAM,C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AAW,EACP,mEAAmE;YACvE,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,KAAK;YAClB,GAAG,EAAE,mGAAmG;SAC3G;QACD,QAAQ,EAAE;YACN,WAAW,EACP,6GAA6G;SACpH;QACD,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,SAAS;KAClB;IACD,IAAI,EAAE,yBAAyB;CAClC,CAAC,CAAC;AAEP,eAAe,wBAAwB,CAAC;AACxC,iIAAiI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-angularjs-enable-svg.d.ts","sourceRoot":"","sources":["../../src/rules/no-angularjs-enable-svg.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"no-angularjs-enable-svg.d.ts","sourceRoot":"","sources":["../../src/rules/no-angularjs-enable-svg.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAgBzD,2BAA2B;AAC3B,QAAA,MAAM,IAAI,EAAE,UAAU,CAAC,OAAO,UAAU,CAuCtC,CAAC;AAEH,eAAe,IAAI,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
|
|
1
2
|
import { arrayIncludes } from "ts-extras";
|
|
2
3
|
import { createRule } from "../_internal/create-rule.js";
|
|
3
|
-
const isExplicitlyDisabledSvgLiteral = (argument) => argument?.type ===
|
|
4
|
+
const isExplicitlyDisabledSvgLiteral = (argument) => argument?.type === AST_NODE_TYPES.Literal &&
|
|
4
5
|
arrayIncludes([
|
|
5
6
|
0,
|
|
6
7
|
"0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-angularjs-enable-svg.js","sourceRoot":"","sources":["../../src/rules/no-angularjs-enable-svg.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,MAAM,8BAA8B,GAAG,CACnC,QAAmC,EAC5B,EAAE,CACT,QAAQ,EAAE,IAAI,KAAK,
|
|
1
|
+
{"version":3,"file":"no-angularjs-enable-svg.js","sourceRoot":"","sources":["../../src/rules/no-angularjs-enable-svg.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,MAAM,8BAA8B,GAAG,CACnC,QAAmC,EAC5B,EAAE,CACT,QAAQ,EAAE,IAAI,KAAK,cAAc,CAAC,OAAO;IACzC,aAAa,CACT;QACI,CAAC;QACD,GAAG;QACH,KAAK;QACL,OAAO;KACV,EACD,QAAQ,CAAC,KAAK,CACjB,CAAC;AAEN,2BAA2B;AAC3B,MAAM,IAAI,GAAkC,UAAU,CAAuB;IACzE,MAAM,CAAC,OAAO;QACV,OAAO;YACH,0FAA0F,CACtF,IAA6B;gBAE7B,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;oBAC9B,OAAO;gBACX,CAAC;gBAED,MAAM,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;gBAEvC,IAAI,8BAA8B,CAAC,aAAa,CAAC,EAAE,CAAC;oBAChD,OAAO;gBACX,CAAC;gBAED,OAAO,CAAC,MAAM,CAAC;oBACX,SAAS,EAAE,gBAAgB;oBAC3B,IAAI;iBACP,CAAC,CAAC;YACP,CAAC;SACJ,CAAC;IACN,CAAC;IACD,IAAI,EAAE;QACF,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE;YACF,WAAW,EACP,0FAA0F;YAC9F,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,KAAK;YAClB,GAAG,EAAE,qFAAqF;SAC7F;QACD,QAAQ,EAAE;YACN,cAAc,EAAE,mDAAmD;SACtE;QACD,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,SAAS;KAClB;IACD,IAAI,EAAE,yBAAyB;CAClC,CAAC,CAAC;AAEH,eAAe,IAAI,CAAC;AACpB,iIAAiI"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { arrayFirst } from "ts-extras";
|
|
2
2
|
import { createRule } from "../_internal/create-rule.js";
|
|
3
|
-
const hasNgBindHtmlPattern = (text) => /\bng-bind-html\b/
|
|
4
|
-
const hasKnownSanitizePattern = (text) => /\b(?:ngsanitize|\$sanitize|sanitize)\b/
|
|
3
|
+
const hasNgBindHtmlPattern = (text) => /\bng-bind-html\b/iv.test(text);
|
|
4
|
+
const hasKnownSanitizePattern = (text) => /\b(?:ngsanitize|\$sanitize|sanitize)\b/iv.test(text);
|
|
5
5
|
/** Rule implementation. */
|
|
6
6
|
const rule = createRule({
|
|
7
7
|
create(context) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-angularjs-sce-resource-url-wildcard.d.ts","sourceRoot":"","sources":["../../src/rules/no-angularjs-sce-resource-url-wildcard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"no-angularjs-sce-resource-url-wildcard.d.ts","sourceRoot":"","sources":["../../src/rules/no-angularjs-sce-resource-url-wildcard.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AA0BzD,2BAA2B;AAC3B,QAAA,MAAM,IAAI,EAAE,UAAU,CAAC,OAAO,UAAU,CAgEtC,CAAC;AAEH,eAAe,IAAI,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
|
|
1
2
|
import { createRule } from "../_internal/create-rule.js";
|
|
2
3
|
const getMemberPropertyName = (memberExpression) => {
|
|
3
4
|
if (!memberExpression.computed &&
|
|
4
|
-
memberExpression.property.type ===
|
|
5
|
+
memberExpression.property.type === AST_NODE_TYPES.Identifier) {
|
|
5
6
|
return memberExpression.property.name;
|
|
6
7
|
}
|
|
7
|
-
if (memberExpression.property.type ===
|
|
8
|
+
if (memberExpression.property.type === AST_NODE_TYPES.Literal &&
|
|
8
9
|
typeof memberExpression.property.value === "string") {
|
|
9
10
|
return memberExpression.property.value;
|
|
10
11
|
}
|
|
@@ -16,7 +17,7 @@ const rule = createRule({
|
|
|
16
17
|
create(context) {
|
|
17
18
|
return {
|
|
18
19
|
CallExpression(node) {
|
|
19
|
-
if (node.callee.type !==
|
|
20
|
+
if (node.callee.type !== AST_NODE_TYPES.MemberExpression) {
|
|
20
21
|
return;
|
|
21
22
|
}
|
|
22
23
|
if (getMemberPropertyName(node.callee) !==
|
|
@@ -25,14 +26,14 @@ const rule = createRule({
|
|
|
25
26
|
}
|
|
26
27
|
const [firstArgument] = node.arguments;
|
|
27
28
|
if (firstArgument === undefined ||
|
|
28
|
-
firstArgument.type ===
|
|
29
|
-
firstArgument.type !==
|
|
29
|
+
firstArgument.type === AST_NODE_TYPES.SpreadElement ||
|
|
30
|
+
firstArgument.type !== AST_NODE_TYPES.ArrayExpression) {
|
|
30
31
|
return;
|
|
31
32
|
}
|
|
32
33
|
for (const elementNode of firstArgument.elements) {
|
|
33
34
|
if (elementNode === null ||
|
|
34
|
-
elementNode.type ===
|
|
35
|
-
elementNode.type !==
|
|
35
|
+
elementNode.type === AST_NODE_TYPES.SpreadElement ||
|
|
36
|
+
elementNode.type !== AST_NODE_TYPES.Literal ||
|
|
36
37
|
typeof elementNode.value !== "string") {
|
|
37
38
|
continue;
|
|
38
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-angularjs-sce-resource-url-wildcard.js","sourceRoot":"","sources":["../../src/rules/no-angularjs-sce-resource-url-wildcard.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAIzD,MAAM,qBAAqB,GAAG,CAC1B,gBAA2C,EACzB,EAAE;IACpB,IACI,CAAC,gBAAgB,CAAC,QAAQ;QAC1B,gBAAgB,CAAC,QAAQ,CAAC,IAAI,KAAK,
|
|
1
|
+
{"version":3,"file":"no-angularjs-sce-resource-url-wildcard.js","sourceRoot":"","sources":["../../src/rules/no-angularjs-sce-resource-url-wildcard.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAIzD,MAAM,qBAAqB,GAAG,CAC1B,gBAA2C,EACzB,EAAE;IACpB,IACI,CAAC,gBAAgB,CAAC,QAAQ;QAC1B,gBAAgB,CAAC,QAAQ,CAAC,IAAI,KAAK,cAAc,CAAC,UAAU,EAC9D,CAAC;QACC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC1C,CAAC;IAED,IACI,gBAAgB,CAAC,QAAQ,CAAC,IAAI,KAAK,cAAc,CAAC,OAAO;QACzD,OAAO,gBAAgB,CAAC,QAAQ,CAAC,KAAK,KAAK,QAAQ,EACrD,CAAC;QACC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC;IAC3C,CAAC;IAED,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,KAAa,EAAW,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAExE,2BAA2B;AAC3B,MAAM,IAAI,GAAkC,UAAU,CAAiB;IACnE,MAAM,CAAC,OAAO;QACV,OAAO;YACH,cAAc,CAAC,IAA6B;gBACxC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,cAAc,CAAC,gBAAgB,EAAE,CAAC;oBACvD,OAAO;gBACX,CAAC;gBAED,IACI,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC;oBAClC,sBAAsB,EACxB,CAAC;oBACC,OAAO;gBACX,CAAC;gBAED,MAAM,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;gBAEvC,IACI,aAAa,KAAK,SAAS;oBAC3B,aAAa,CAAC,IAAI,KAAK,cAAc,CAAC,aAAa;oBACnD,aAAa,CAAC,IAAI,KAAK,cAAc,CAAC,eAAe,EACvD,CAAC;oBACC,OAAO;gBACX,CAAC;gBAED,KAAK,MAAM,WAAW,IAAI,aAAa,CAAC,QAAQ,EAAE,CAAC;oBAC/C,IACI,WAAW,KAAK,IAAI;wBACpB,WAAW,CAAC,IAAI,KAAK,cAAc,CAAC,aAAa;wBACjD,WAAW,CAAC,IAAI,KAAK,cAAc,CAAC,OAAO;wBAC3C,OAAO,WAAW,CAAC,KAAK,KAAK,QAAQ,EACvC,CAAC;wBACC,SAAS;oBACb,CAAC;oBAED,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;wBACtC,SAAS;oBACb,CAAC;oBAED,OAAO,CAAC,MAAM,CAAC;wBACX,SAAS,EAAE,SAAS;wBACpB,IAAI,EAAE,WAAW;qBACpB,CAAC,CAAC;gBACP,CAAC;YACL,CAAC;SACJ,CAAC;IACN,CAAC;IACD,IAAI,EAAE;QACF,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE;YACF,WAAW,EACP,qEAAqE;YACzE,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,KAAK;YAClB,GAAG,EAAE,oGAAoG;SAC5G;QACD,QAAQ,EAAE;YACN,OAAO,EACH,mFAAmF;SAC1F;QACD,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,SAAS;KAClB;IACD,IAAI,EAAE,wCAAwC;CACjD,CAAC,CAAC;AAEH,eAAe,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-child-process-exec.d.ts","sourceRoot":"","sources":["../../src/rules/no-child-process-exec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"no-child-process-exec.d.ts","sourceRoot":"","sources":["../../src/rules/no-child-process-exec.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AA6DzD,2BAA2B;AAC3B,QAAA,MAAM,IAAI,EAAE,UAAU,CAAC,OAAO,UAAU,CAkJtC,CAAC;AAEH,eAAe,IAAI,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
|
|
1
2
|
import { isDefined, setHas } from "ts-extras";
|
|
2
3
|
import { createRule } from "../_internal/create-rule.js";
|
|
3
4
|
import { getMemberPropertyName, getPropertyName, } from "../_internal/estree-utils.js";
|
|
@@ -9,24 +10,24 @@ const DISALLOWED_CHILD_PROCESS_METHOD_NAMES = new Set(["exec", "execSync"]);
|
|
|
9
10
|
const isDisallowedChildProcessMethodName = (value) => isDefined(value) && setHas(DISALLOWED_CHILD_PROCESS_METHOD_NAMES, value);
|
|
10
11
|
const isChildProcessModuleSource = (value) => setHas(CHILD_PROCESS_MODULE_NAMES, value);
|
|
11
12
|
const isRequireCallFromChildProcess = (expression) => {
|
|
12
|
-
if (expression?.type !==
|
|
13
|
-
expression.callee.type !==
|
|
13
|
+
if (expression?.type !== AST_NODE_TYPES.CallExpression ||
|
|
14
|
+
expression.callee.type !== AST_NODE_TYPES.Identifier ||
|
|
14
15
|
expression.callee.name !== "require") {
|
|
15
16
|
return false;
|
|
16
17
|
}
|
|
17
18
|
const [firstArgument] = expression.arguments;
|
|
18
19
|
return (firstArgument !== undefined &&
|
|
19
|
-
firstArgument.type !==
|
|
20
|
-
firstArgument.type ===
|
|
20
|
+
firstArgument.type !== AST_NODE_TYPES.SpreadElement &&
|
|
21
|
+
firstArgument.type === AST_NODE_TYPES.Literal &&
|
|
21
22
|
typeof firstArgument.value === "string" &&
|
|
22
23
|
isChildProcessModuleSource(firstArgument.value));
|
|
23
24
|
};
|
|
24
25
|
const getPatternIdentifier = (pattern) => {
|
|
25
|
-
if (pattern.type ===
|
|
26
|
+
if (pattern.type === AST_NODE_TYPES.Identifier) {
|
|
26
27
|
return pattern;
|
|
27
28
|
}
|
|
28
|
-
if (pattern.type ===
|
|
29
|
-
pattern.left.type ===
|
|
29
|
+
if (pattern.type === AST_NODE_TYPES.AssignmentPattern &&
|
|
30
|
+
pattern.left.type === AST_NODE_TYPES.Identifier) {
|
|
30
31
|
return pattern.left;
|
|
31
32
|
}
|
|
32
33
|
return undefined;
|
|
@@ -38,7 +39,7 @@ const rule = createRule({
|
|
|
38
39
|
const childProcessNamespaceBindingNames = new Set();
|
|
39
40
|
return {
|
|
40
41
|
CallExpression(node) {
|
|
41
|
-
if (node.callee.type ===
|
|
42
|
+
if (node.callee.type === AST_NODE_TYPES.Identifier) {
|
|
42
43
|
if (!setHas(childProcessExecBindingNames, node.callee.name)) {
|
|
43
44
|
return;
|
|
44
45
|
}
|
|
@@ -48,14 +49,14 @@ const rule = createRule({
|
|
|
48
49
|
});
|
|
49
50
|
return;
|
|
50
51
|
}
|
|
51
|
-
if (node.callee.type !==
|
|
52
|
+
if (node.callee.type !== AST_NODE_TYPES.MemberExpression) {
|
|
52
53
|
return;
|
|
53
54
|
}
|
|
54
55
|
const methodName = getMemberPropertyName(node.callee);
|
|
55
56
|
if (!isDisallowedChildProcessMethodName(methodName)) {
|
|
56
57
|
return;
|
|
57
58
|
}
|
|
58
|
-
if (node.callee.object.type ===
|
|
59
|
+
if (node.callee.object.type === AST_NODE_TYPES.Identifier &&
|
|
59
60
|
setHas(childProcessNamespaceBindingNames, node.callee.object.name)) {
|
|
60
61
|
context.report({
|
|
61
62
|
messageId: "default",
|
|
@@ -63,7 +64,7 @@ const rule = createRule({
|
|
|
63
64
|
});
|
|
64
65
|
return;
|
|
65
66
|
}
|
|
66
|
-
if (node.callee.object.type ===
|
|
67
|
+
if (node.callee.object.type === AST_NODE_TYPES.CallExpression &&
|
|
67
68
|
isRequireCallFromChildProcess(node.callee.object)) {
|
|
68
69
|
context.report({
|
|
69
70
|
messageId: "default",
|
|
@@ -76,12 +77,15 @@ const rule = createRule({
|
|
|
76
77
|
return;
|
|
77
78
|
}
|
|
78
79
|
for (const specifierNode of node.specifiers) {
|
|
79
|
-
if (specifierNode.type ===
|
|
80
|
-
|
|
80
|
+
if (specifierNode.type ===
|
|
81
|
+
AST_NODE_TYPES.ImportDefaultSpecifier ||
|
|
82
|
+
specifierNode.type ===
|
|
83
|
+
AST_NODE_TYPES.ImportNamespaceSpecifier) {
|
|
81
84
|
childProcessNamespaceBindingNames.add(specifierNode.local.name);
|
|
82
85
|
continue;
|
|
83
86
|
}
|
|
84
|
-
const importedName = specifierNode.imported.type ===
|
|
87
|
+
const importedName = specifierNode.imported.type ===
|
|
88
|
+
AST_NODE_TYPES.Identifier
|
|
85
89
|
? specifierNode.imported.name
|
|
86
90
|
: specifierNode.imported.value;
|
|
87
91
|
if (!isDisallowedChildProcessMethodName(importedName)) {
|
|
@@ -94,15 +98,15 @@ const rule = createRule({
|
|
|
94
98
|
if (!isRequireCallFromChildProcess(node.init)) {
|
|
95
99
|
return;
|
|
96
100
|
}
|
|
97
|
-
if (node.id.type ===
|
|
101
|
+
if (node.id.type === AST_NODE_TYPES.Identifier) {
|
|
98
102
|
childProcessNamespaceBindingNames.add(node.id.name);
|
|
99
103
|
return;
|
|
100
104
|
}
|
|
101
|
-
if (node.id.type !==
|
|
105
|
+
if (node.id.type !== AST_NODE_TYPES.ObjectPattern) {
|
|
102
106
|
return;
|
|
103
107
|
}
|
|
104
108
|
for (const propertyNode of node.id.properties) {
|
|
105
|
-
if (propertyNode.type !==
|
|
109
|
+
if (propertyNode.type !== AST_NODE_TYPES.Property ||
|
|
106
110
|
propertyNode.computed) {
|
|
107
111
|
continue;
|
|
108
112
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-child-process-exec.js","sourceRoot":"","sources":["../../src/rules/no-child-process-exec.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,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C,IAAI,KAAK,cAAc,CAAC,QAAQ;wBAC7C,YAAY,CAAC,QAAQ,EACvB,CAAC;wBACC,SAAS;oBACb,CAAC;oBAED,MAAM,YAAY,GAAG,eAAe,CAAC,YAAY,CAAC,CAAC;oBAEnD,IAAI,CAAC,kCAAkC,CAAC,YAAY,CAAC,EAAE,CAAC;wBACpD,SAAS;oBACb,CAAC;oBAED,MAAM,eAAe,GAAG,oBAAoB,CACxC,YAAY,CAAC,KAAK,CACrB,CAAC;oBAEF,IAAI,eAAe,KAAK,SAAS,EAAE,CAAC;wBAChC,SAAS;oBACb,CAAC;oBAED,4BAA4B,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;gBAC3D,CAAC;YACL,CAAC;SACJ,CAAC;IACN,CAAC;IACD,IAAI,EAAE;QACF,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE;YACF,WAAW,EACP,2EAA2E;YAC/E,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,KAAK;YAClB,GAAG,EAAE,mFAAmF;SAC3F;QACD,QAAQ,EAAE;YACN,OAAO,EACH,sHAAsH;SAC7H;QACD,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,SAAS;KAClB;IACD,IAAI,EAAE,uBAAuB;CAChC,CAAC,CAAC;AAEH,eAAe,IAAI,CAAC;AACpB,iIAAiI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-child-process-shell-true.d.ts","sourceRoot":"","sources":["../../src/rules/no-child-process-shell-true.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"no-child-process-shell-true.d.ts","sourceRoot":"","sources":["../../src/rules/no-child-process-shell-true.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AA0EzD,2BAA2B;AAC3B,QAAA,MAAM,IAAI,EAAE,UAAU,CAAC,OAAO,UAAU,CA0CtC,CAAC;AAEH,eAAe,IAAI,CAAC"}
|
|
@@ -1,27 +1,29 @@
|
|
|
1
|
+
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
|
|
1
2
|
import { createRule } from "../_internal/create-rule.js";
|
|
2
3
|
const getMemberPropertyName = (memberExpression) => {
|
|
3
4
|
if (!memberExpression.computed &&
|
|
4
|
-
memberExpression.property.type ===
|
|
5
|
+
memberExpression.property.type === AST_NODE_TYPES.Identifier) {
|
|
5
6
|
return memberExpression.property.name;
|
|
6
7
|
}
|
|
7
|
-
if (memberExpression.property.type ===
|
|
8
|
+
if (memberExpression.property.type === AST_NODE_TYPES.Literal &&
|
|
8
9
|
typeof memberExpression.property.value === "string") {
|
|
9
10
|
return memberExpression.property.value;
|
|
10
11
|
}
|
|
11
12
|
return undefined;
|
|
12
13
|
};
|
|
13
|
-
const isTruthyLiteral = (node) => node.type ===
|
|
14
|
+
const isTruthyLiteral = (node) => node.type === AST_NODE_TYPES.Literal && node.value === true;
|
|
14
15
|
const hasShellTrueOption = (optionsNode) => {
|
|
15
|
-
if (optionsNode.type !==
|
|
16
|
+
if (optionsNode.type !== AST_NODE_TYPES.ObjectExpression) {
|
|
16
17
|
return false;
|
|
17
18
|
}
|
|
18
19
|
for (const propertyNode of optionsNode.properties) {
|
|
19
|
-
if (propertyNode.type !==
|
|
20
|
+
if (propertyNode.type !== AST_NODE_TYPES.Property ||
|
|
21
|
+
propertyNode.kind !== "init") {
|
|
20
22
|
continue;
|
|
21
23
|
}
|
|
22
|
-
const keyName = propertyNode.key.type ===
|
|
24
|
+
const keyName = propertyNode.key.type === AST_NODE_TYPES.Identifier
|
|
23
25
|
? propertyNode.key.name
|
|
24
|
-
: propertyNode.key.type ===
|
|
26
|
+
: propertyNode.key.type === AST_NODE_TYPES.Literal &&
|
|
25
27
|
typeof propertyNode.key.value === "string"
|
|
26
28
|
? propertyNode.key.value
|
|
27
29
|
: undefined;
|
|
@@ -35,10 +37,10 @@ const hasShellTrueOption = (optionsNode) => {
|
|
|
35
37
|
return false;
|
|
36
38
|
};
|
|
37
39
|
const isTargetChildProcessMethod = (node) => {
|
|
38
|
-
if (node.callee.type ===
|
|
40
|
+
if (node.callee.type === AST_NODE_TYPES.Identifier) {
|
|
39
41
|
return node.callee.name === "spawn" || node.callee.name === "execFile";
|
|
40
42
|
}
|
|
41
|
-
if (node.callee.type !==
|
|
43
|
+
if (node.callee.type !== AST_NODE_TYPES.MemberExpression) {
|
|
42
44
|
return false;
|
|
43
45
|
}
|
|
44
46
|
const methodName = getMemberPropertyName(node.callee);
|
|
@@ -53,7 +55,7 @@ const rule = createRule({
|
|
|
53
55
|
return;
|
|
54
56
|
}
|
|
55
57
|
for (const argumentNode of node.arguments) {
|
|
56
|
-
if (argumentNode.type ===
|
|
58
|
+
if (argumentNode.type === AST_NODE_TYPES.SpreadElement) {
|
|
57
59
|
continue;
|
|
58
60
|
}
|
|
59
61
|
if (!hasShellTrueOption(argumentNode)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-child-process-shell-true.js","sourceRoot":"","sources":["../../src/rules/no-child-process-shell-true.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAIzD,MAAM,qBAAqB,GAAG,CAC1B,gBAA2C,EACzB,EAAE;IACpB,IACI,CAAC,gBAAgB,CAAC,QAAQ;QAC1B,gBAAgB,CAAC,QAAQ,CAAC,IAAI,KAAK,
|
|
1
|
+
{"version":3,"file":"no-child-process-shell-true.js","sourceRoot":"","sources":["../../src/rules/no-child-process-shell-true.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAIzD,MAAM,qBAAqB,GAAG,CAC1B,gBAA2C,EACzB,EAAE;IACpB,IACI,CAAC,gBAAgB,CAAC,QAAQ;QAC1B,gBAAgB,CAAC,QAAQ,CAAC,IAAI,KAAK,cAAc,CAAC,UAAU,EAC9D,CAAC;QACC,OAAO,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,IAAI,EAAE;YACF,WAAW,EACP,wEAAwE;YAC5E,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,KAAK;YAClB,GAAG,EAAE,yFAAyF;SACjG;QACD,QAAQ,EAAE;YACN,OAAO,EACH,8DAA8D;SACrE;QACD,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,SAAS;KAClB;IACD,IAAI,EAAE,6BAA6B;CACtC,CAAC,CAAC;AAEH,eAAe,IAAI,CAAC;AACpB,iIAAiI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-document-domain.d.ts","sourceRoot":"","sources":["../../src/rules/no-document-domain.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"no-document-domain.d.ts","sourceRoot":"","sources":["../../src/rules/no-document-domain.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,2BAA2B;AAC3B,QAAA,MAAM,IAAI,EAAE,UAAU,CAAC,OAAO,UAAU,CA6CtC,CAAC;AAEH,eAAe,IAAI,CAAC"}
|