eslint-plugin-sdl-2 1.0.4

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.
Files changed (418) hide show
  1. package/CHANGELOG.md +5316 -0
  2. package/LICENSE +21 -0
  3. package/README.md +133 -0
  4. package/dist/_internal/ast-utils.d.ts +17 -0
  5. package/dist/_internal/ast-utils.d.ts.map +1 -0
  6. package/dist/_internal/ast-utils.js +93 -0
  7. package/dist/_internal/ast-utils.js.map +1 -0
  8. package/dist/_internal/config-references.d.ts +5 -0
  9. package/dist/_internal/config-references.d.ts.map +1 -0
  10. package/dist/_internal/config-references.js +13 -0
  11. package/dist/_internal/config-references.js.map +1 -0
  12. package/dist/_internal/create-rule.d.ts +9 -0
  13. package/dist/_internal/create-rule.d.ts.map +1 -0
  14. package/dist/_internal/create-rule.js +6 -0
  15. package/dist/_internal/create-rule.js.map +1 -0
  16. package/dist/_internal/domparser.d.ts +19 -0
  17. package/dist/_internal/domparser.d.ts.map +1 -0
  18. package/dist/_internal/domparser.js +45 -0
  19. package/dist/_internal/domparser.js.map +1 -0
  20. package/dist/_internal/electron-web-preferences.d.ts +14 -0
  21. package/dist/_internal/electron-web-preferences.d.ts.map +1 -0
  22. package/dist/_internal/electron-web-preferences.js +63 -0
  23. package/dist/_internal/electron-web-preferences.js.map +1 -0
  24. package/dist/_internal/estree-utils.d.ts +51 -0
  25. package/dist/_internal/estree-utils.d.ts.map +1 -0
  26. package/dist/_internal/estree-utils.js +112 -0
  27. package/dist/_internal/estree-utils.js.map +1 -0
  28. package/dist/_internal/node-tls-config.d.ts +44 -0
  29. package/dist/_internal/node-tls-config.d.ts.map +1 -0
  30. package/dist/_internal/node-tls-config.js +101 -0
  31. package/dist/_internal/node-tls-config.js.map +1 -0
  32. package/dist/_internal/rules-registry.d.ts +10 -0
  33. package/dist/_internal/rules-registry.d.ts.map +1 -0
  34. package/dist/_internal/rules-registry.js +148 -0
  35. package/dist/_internal/rules-registry.js.map +1 -0
  36. package/dist/_internal/script-element.d.ts +7 -0
  37. package/dist/_internal/script-element.d.ts.map +1 -0
  38. package/dist/_internal/script-element.js +46 -0
  39. package/dist/_internal/script-element.js.map +1 -0
  40. package/dist/_internal/worker-code-loading.d.ts +69 -0
  41. package/dist/_internal/worker-code-loading.d.ts.map +1 -0
  42. package/dist/_internal/worker-code-loading.js +134 -0
  43. package/dist/_internal/worker-code-loading.js.map +1 -0
  44. package/dist/plugin.cjs +6036 -0
  45. package/dist/plugin.cjs.map +7 -0
  46. package/dist/plugin.d.cts +11 -0
  47. package/dist/plugin.d.ts +11 -0
  48. package/dist/plugin.d.ts.map +1 -0
  49. package/dist/plugin.js +235 -0
  50. package/dist/plugin.js.map +1 -0
  51. package/dist/rules/no-angular-bypass-sanitizer.d.ts +5 -0
  52. package/dist/rules/no-angular-bypass-sanitizer.d.ts.map +1 -0
  53. package/dist/rules/no-angular-bypass-sanitizer.js +32 -0
  54. package/dist/rules/no-angular-bypass-sanitizer.js.map +1 -0
  55. package/dist/rules/no-angular-bypass-security-trust-html.d.ts +5 -0
  56. package/dist/rules/no-angular-bypass-security-trust-html.d.ts.map +1 -0
  57. package/dist/rules/no-angular-bypass-security-trust-html.js +51 -0
  58. package/dist/rules/no-angular-bypass-security-trust-html.js.map +1 -0
  59. package/dist/rules/no-angular-innerhtml-binding.d.ts +5 -0
  60. package/dist/rules/no-angular-innerhtml-binding.d.ts.map +1 -0
  61. package/dist/rules/no-angular-innerhtml-binding.js +57 -0
  62. package/dist/rules/no-angular-innerhtml-binding.js.map +1 -0
  63. package/dist/rules/no-angular-sanitization-trusted-urls.d.ts +5 -0
  64. package/dist/rules/no-angular-sanitization-trusted-urls.d.ts.map +1 -0
  65. package/dist/rules/no-angular-sanitization-trusted-urls.js +32 -0
  66. package/dist/rules/no-angular-sanitization-trusted-urls.js.map +1 -0
  67. package/dist/rules/no-angularjs-bypass-sce.d.ts +5 -0
  68. package/dist/rules/no-angularjs-bypass-sce.d.ts.map +1 -0
  69. package/dist/rules/no-angularjs-bypass-sce.js +80 -0
  70. package/dist/rules/no-angularjs-bypass-sce.js.map +1 -0
  71. package/dist/rules/no-angularjs-enable-svg.d.ts +5 -0
  72. package/dist/rules/no-angularjs-enable-svg.d.ts.map +1 -0
  73. package/dist/rules/no-angularjs-enable-svg.js +48 -0
  74. package/dist/rules/no-angularjs-enable-svg.js.map +1 -0
  75. package/dist/rules/no-angularjs-ng-bind-html-without-sanitize.d.ts +5 -0
  76. package/dist/rules/no-angularjs-ng-bind-html-without-sanitize.d.ts.map +1 -0
  77. package/dist/rules/no-angularjs-ng-bind-html-without-sanitize.js +64 -0
  78. package/dist/rules/no-angularjs-ng-bind-html-without-sanitize.js.map +1 -0
  79. package/dist/rules/no-angularjs-sanitization-whitelist.d.ts +5 -0
  80. package/dist/rules/no-angularjs-sanitization-whitelist.d.ts.map +1 -0
  81. package/dist/rules/no-angularjs-sanitization-whitelist.js +32 -0
  82. package/dist/rules/no-angularjs-sanitization-whitelist.js.map +1 -0
  83. package/dist/rules/no-angularjs-sce-resource-url-wildcard.d.ts +5 -0
  84. package/dist/rules/no-angularjs-sce-resource-url-wildcard.d.ts.map +1 -0
  85. package/dist/rules/no-angularjs-sce-resource-url-wildcard.js +69 -0
  86. package/dist/rules/no-angularjs-sce-resource-url-wildcard.js.map +1 -0
  87. package/dist/rules/no-child-process-exec.d.ts +5 -0
  88. package/dist/rules/no-child-process-exec.d.ts.map +1 -0
  89. package/dist/rules/no-child-process-exec.js +141 -0
  90. package/dist/rules/no-child-process-exec.js.map +1 -0
  91. package/dist/rules/no-child-process-shell-true.d.ts +5 -0
  92. package/dist/rules/no-child-process-shell-true.d.ts.map +1 -0
  93. package/dist/rules/no-child-process-shell-true.js +89 -0
  94. package/dist/rules/no-child-process-shell-true.js.map +1 -0
  95. package/dist/rules/no-cookies.d.ts +5 -0
  96. package/dist/rules/no-cookies.d.ts.map +1 -0
  97. package/dist/rules/no-cookies.js +38 -0
  98. package/dist/rules/no-cookies.js.map +1 -0
  99. package/dist/rules/no-document-domain.d.ts +5 -0
  100. package/dist/rules/no-document-domain.d.ts.map +1 -0
  101. package/dist/rules/no-document-domain.js +41 -0
  102. package/dist/rules/no-document-domain.js.map +1 -0
  103. package/dist/rules/no-document-execcommand-insert-html.d.ts +5 -0
  104. package/dist/rules/no-document-execcommand-insert-html.d.ts.map +1 -0
  105. package/dist/rules/no-document-execcommand-insert-html.js +57 -0
  106. package/dist/rules/no-document-execcommand-insert-html.js.map +1 -0
  107. package/dist/rules/no-document-parse-html-unsafe.d.ts +5 -0
  108. package/dist/rules/no-document-parse-html-unsafe.d.ts.map +1 -0
  109. package/dist/rules/no-document-parse-html-unsafe.js +67 -0
  110. package/dist/rules/no-document-parse-html-unsafe.js.map +1 -0
  111. package/dist/rules/no-document-write.d.ts +5 -0
  112. package/dist/rules/no-document-write.d.ts.map +1 -0
  113. package/dist/rules/no-document-write.js +40 -0
  114. package/dist/rules/no-document-write.js.map +1 -0
  115. package/dist/rules/no-domparser-html-without-sanitization.d.ts +5 -0
  116. package/dist/rules/no-domparser-html-without-sanitization.d.ts.map +1 -0
  117. package/dist/rules/no-domparser-html-without-sanitization.js +56 -0
  118. package/dist/rules/no-domparser-html-without-sanitization.js.map +1 -0
  119. package/dist/rules/no-domparser-svg-without-sanitization.d.ts +5 -0
  120. package/dist/rules/no-domparser-svg-without-sanitization.d.ts.map +1 -0
  121. package/dist/rules/no-domparser-svg-without-sanitization.js +56 -0
  122. package/dist/rules/no-domparser-svg-without-sanitization.js.map +1 -0
  123. package/dist/rules/no-dynamic-import-unsafe-url.d.ts +5 -0
  124. package/dist/rules/no-dynamic-import-unsafe-url.d.ts.map +1 -0
  125. package/dist/rules/no-dynamic-import-unsafe-url.js +47 -0
  126. package/dist/rules/no-dynamic-import-unsafe-url.js.map +1 -0
  127. package/dist/rules/no-electron-allow-running-insecure-content.d.ts +5 -0
  128. package/dist/rules/no-electron-allow-running-insecure-content.d.ts.map +1 -0
  129. package/dist/rules/no-electron-allow-running-insecure-content.js +30 -0
  130. package/dist/rules/no-electron-allow-running-insecure-content.js.map +1 -0
  131. package/dist/rules/no-electron-dangerous-blink-features.d.ts +5 -0
  132. package/dist/rules/no-electron-dangerous-blink-features.d.ts.map +1 -0
  133. package/dist/rules/no-electron-dangerous-blink-features.js +89 -0
  134. package/dist/rules/no-electron-dangerous-blink-features.js.map +1 -0
  135. package/dist/rules/no-electron-disable-context-isolation.d.ts +5 -0
  136. package/dist/rules/no-electron-disable-context-isolation.d.ts.map +1 -0
  137. package/dist/rules/no-electron-disable-context-isolation.js +30 -0
  138. package/dist/rules/no-electron-disable-context-isolation.js.map +1 -0
  139. package/dist/rules/no-electron-disable-sandbox.d.ts +5 -0
  140. package/dist/rules/no-electron-disable-sandbox.d.ts.map +1 -0
  141. package/dist/rules/no-electron-disable-sandbox.js +30 -0
  142. package/dist/rules/no-electron-disable-sandbox.js.map +1 -0
  143. package/dist/rules/no-electron-disable-web-security.d.ts +5 -0
  144. package/dist/rules/no-electron-disable-web-security.d.ts.map +1 -0
  145. package/dist/rules/no-electron-disable-web-security.js +30 -0
  146. package/dist/rules/no-electron-disable-web-security.js.map +1 -0
  147. package/dist/rules/no-electron-enable-remote-module.d.ts +5 -0
  148. package/dist/rules/no-electron-enable-remote-module.d.ts.map +1 -0
  149. package/dist/rules/no-electron-enable-remote-module.js +30 -0
  150. package/dist/rules/no-electron-enable-remote-module.js.map +1 -0
  151. package/dist/rules/no-electron-enable-webview-tag.d.ts +5 -0
  152. package/dist/rules/no-electron-enable-webview-tag.d.ts.map +1 -0
  153. package/dist/rules/no-electron-enable-webview-tag.js +30 -0
  154. package/dist/rules/no-electron-enable-webview-tag.js.map +1 -0
  155. package/dist/rules/no-electron-experimental-features.d.ts +5 -0
  156. package/dist/rules/no-electron-experimental-features.d.ts.map +1 -0
  157. package/dist/rules/no-electron-experimental-features.js +30 -0
  158. package/dist/rules/no-electron-experimental-features.js.map +1 -0
  159. package/dist/rules/no-electron-expose-raw-ipc-renderer.d.ts +5 -0
  160. package/dist/rules/no-electron-expose-raw-ipc-renderer.d.ts.map +1 -0
  161. package/dist/rules/no-electron-expose-raw-ipc-renderer.js +108 -0
  162. package/dist/rules/no-electron-expose-raw-ipc-renderer.js.map +1 -0
  163. package/dist/rules/no-electron-insecure-certificate-error-handler.d.ts +5 -0
  164. package/dist/rules/no-electron-insecure-certificate-error-handler.d.ts.map +1 -0
  165. package/dist/rules/no-electron-insecure-certificate-error-handler.js +91 -0
  166. package/dist/rules/no-electron-insecure-certificate-error-handler.js.map +1 -0
  167. package/dist/rules/no-electron-insecure-certificate-verify-proc.d.ts +5 -0
  168. package/dist/rules/no-electron-insecure-certificate-verify-proc.d.ts.map +1 -0
  169. package/dist/rules/no-electron-insecure-certificate-verify-proc.js +75 -0
  170. package/dist/rules/no-electron-insecure-certificate-verify-proc.js.map +1 -0
  171. package/dist/rules/no-electron-insecure-permission-request-handler.d.ts +5 -0
  172. package/dist/rules/no-electron-insecure-permission-request-handler.d.ts.map +1 -0
  173. package/dist/rules/no-electron-insecure-permission-request-handler.js +75 -0
  174. package/dist/rules/no-electron-insecure-permission-request-handler.js.map +1 -0
  175. package/dist/rules/no-electron-node-integration.d.ts +5 -0
  176. package/dist/rules/no-electron-node-integration.d.ts.map +1 -0
  177. package/dist/rules/no-electron-node-integration.js +52 -0
  178. package/dist/rules/no-electron-node-integration.js.map +1 -0
  179. package/dist/rules/no-electron-permission-check-handler-allow-all.d.ts +5 -0
  180. package/dist/rules/no-electron-permission-check-handler-allow-all.d.ts.map +1 -0
  181. package/dist/rules/no-electron-permission-check-handler-allow-all.js +63 -0
  182. package/dist/rules/no-electron-permission-check-handler-allow-all.js.map +1 -0
  183. package/dist/rules/no-electron-unchecked-ipc-sender.d.ts +5 -0
  184. package/dist/rules/no-electron-unchecked-ipc-sender.d.ts.map +1 -0
  185. package/dist/rules/no-electron-unchecked-ipc-sender.js +90 -0
  186. package/dist/rules/no-electron-unchecked-ipc-sender.js.map +1 -0
  187. package/dist/rules/no-electron-unrestricted-navigation.d.ts +5 -0
  188. package/dist/rules/no-electron-unrestricted-navigation.d.ts.map +1 -0
  189. package/dist/rules/no-electron-unrestricted-navigation.js +100 -0
  190. package/dist/rules/no-electron-unrestricted-navigation.js.map +1 -0
  191. package/dist/rules/no-electron-untrusted-open-external.d.ts +5 -0
  192. package/dist/rules/no-electron-untrusted-open-external.d.ts.map +1 -0
  193. package/dist/rules/no-electron-untrusted-open-external.js +92 -0
  194. package/dist/rules/no-electron-untrusted-open-external.js.map +1 -0
  195. package/dist/rules/no-electron-webview-allowpopups.d.ts +5 -0
  196. package/dist/rules/no-electron-webview-allowpopups.d.ts.map +1 -0
  197. package/dist/rules/no-electron-webview-allowpopups.js +85 -0
  198. package/dist/rules/no-electron-webview-allowpopups.js.map +1 -0
  199. package/dist/rules/no-electron-webview-insecure-webpreferences.d.ts +5 -0
  200. package/dist/rules/no-electron-webview-insecure-webpreferences.d.ts.map +1 -0
  201. package/dist/rules/no-electron-webview-insecure-webpreferences.js +88 -0
  202. package/dist/rules/no-electron-webview-insecure-webpreferences.js.map +1 -0
  203. package/dist/rules/no-electron-webview-node-integration.d.ts +5 -0
  204. package/dist/rules/no-electron-webview-node-integration.d.ts.map +1 -0
  205. package/dist/rules/no-electron-webview-node-integration.js +107 -0
  206. package/dist/rules/no-electron-webview-node-integration.js.map +1 -0
  207. package/dist/rules/no-html-method.d.ts +5 -0
  208. package/dist/rules/no-html-method.d.ts.map +1 -0
  209. package/dist/rules/no-html-method.js +42 -0
  210. package/dist/rules/no-html-method.js.map +1 -0
  211. package/dist/rules/no-http-request-to-insecure-protocol.d.ts +5 -0
  212. package/dist/rules/no-http-request-to-insecure-protocol.d.ts.map +1 -0
  213. package/dist/rules/no-http-request-to-insecure-protocol.js +94 -0
  214. package/dist/rules/no-http-request-to-insecure-protocol.js.map +1 -0
  215. package/dist/rules/no-iframe-srcdoc.d.ts +5 -0
  216. package/dist/rules/no-iframe-srcdoc.d.ts.map +1 -0
  217. package/dist/rules/no-iframe-srcdoc.js +144 -0
  218. package/dist/rules/no-iframe-srcdoc.js.map +1 -0
  219. package/dist/rules/no-inner-html.d.ts +5 -0
  220. package/dist/rules/no-inner-html.d.ts.map +1 -0
  221. package/dist/rules/no-inner-html.js +67 -0
  222. package/dist/rules/no-inner-html.js.map +1 -0
  223. package/dist/rules/no-insecure-random.d.ts +5 -0
  224. package/dist/rules/no-insecure-random.d.ts.map +1 -0
  225. package/dist/rules/no-insecure-random.js +95 -0
  226. package/dist/rules/no-insecure-random.js.map +1 -0
  227. package/dist/rules/no-insecure-tls-agent-options.d.ts +5 -0
  228. package/dist/rules/no-insecure-tls-agent-options.d.ts.map +1 -0
  229. package/dist/rules/no-insecure-tls-agent-options.js +73 -0
  230. package/dist/rules/no-insecure-tls-agent-options.js.map +1 -0
  231. package/dist/rules/no-insecure-url.d.ts +12 -0
  232. package/dist/rules/no-insecure-url.d.ts.map +1 -0
  233. package/dist/rules/no-insecure-url.js +142 -0
  234. package/dist/rules/no-insecure-url.js.map +1 -0
  235. package/dist/rules/no-location-javascript-url.d.ts +5 -0
  236. package/dist/rules/no-location-javascript-url.d.ts.map +1 -0
  237. package/dist/rules/no-location-javascript-url.js +98 -0
  238. package/dist/rules/no-location-javascript-url.js.map +1 -0
  239. package/dist/rules/no-message-event-without-origin-check.d.ts +5 -0
  240. package/dist/rules/no-message-event-without-origin-check.d.ts.map +1 -0
  241. package/dist/rules/no-message-event-without-origin-check.js +183 -0
  242. package/dist/rules/no-message-event-without-origin-check.js.map +1 -0
  243. package/dist/rules/no-msapp-exec-unsafe.d.ts +5 -0
  244. package/dist/rules/no-msapp-exec-unsafe.d.ts.map +1 -0
  245. package/dist/rules/no-msapp-exec-unsafe.js +32 -0
  246. package/dist/rules/no-msapp-exec-unsafe.js.map +1 -0
  247. package/dist/rules/no-node-tls-check-server-identity-bypass.d.ts +5 -0
  248. package/dist/rules/no-node-tls-check-server-identity-bypass.d.ts.map +1 -0
  249. package/dist/rules/no-node-tls-check-server-identity-bypass.js +95 -0
  250. package/dist/rules/no-node-tls-check-server-identity-bypass.js.map +1 -0
  251. package/dist/rules/no-node-tls-legacy-protocol.d.ts +5 -0
  252. package/dist/rules/no-node-tls-legacy-protocol.d.ts.map +1 -0
  253. package/dist/rules/no-node-tls-legacy-protocol.js +106 -0
  254. package/dist/rules/no-node-tls-legacy-protocol.js.map +1 -0
  255. package/dist/rules/no-node-tls-reject-unauthorized-zero.d.ts +5 -0
  256. package/dist/rules/no-node-tls-reject-unauthorized-zero.d.ts.map +1 -0
  257. package/dist/rules/no-node-tls-reject-unauthorized-zero.js +93 -0
  258. package/dist/rules/no-node-tls-reject-unauthorized-zero.js.map +1 -0
  259. package/dist/rules/no-node-tls-security-level-zero.d.ts +5 -0
  260. package/dist/rules/no-node-tls-security-level-zero.d.ts.map +1 -0
  261. package/dist/rules/no-node-tls-security-level-zero.js +80 -0
  262. package/dist/rules/no-node-tls-security-level-zero.js.map +1 -0
  263. package/dist/rules/no-node-vm-run-in-context.d.ts +5 -0
  264. package/dist/rules/no-node-vm-run-in-context.d.ts.map +1 -0
  265. package/dist/rules/no-node-vm-run-in-context.js +186 -0
  266. package/dist/rules/no-node-vm-run-in-context.js.map +1 -0
  267. package/dist/rules/no-node-vm-source-text-module.d.ts +5 -0
  268. package/dist/rules/no-node-vm-source-text-module.d.ts.map +1 -0
  269. package/dist/rules/no-node-vm-source-text-module.js +126 -0
  270. package/dist/rules/no-node-vm-source-text-module.js.map +1 -0
  271. package/dist/rules/no-node-worker-threads-eval.d.ts +5 -0
  272. package/dist/rules/no-node-worker-threads-eval.d.ts.map +1 -0
  273. package/dist/rules/no-node-worker-threads-eval.js +151 -0
  274. package/dist/rules/no-node-worker-threads-eval.js.map +1 -0
  275. package/dist/rules/no-nonnull-assertion-on-security-input.d.ts +5 -0
  276. package/dist/rules/no-nonnull-assertion-on-security-input.d.ts.map +1 -0
  277. package/dist/rules/no-nonnull-assertion-on-security-input.js +48 -0
  278. package/dist/rules/no-nonnull-assertion-on-security-input.js.map +1 -0
  279. package/dist/rules/no-postmessage-star-origin.d.ts +5 -0
  280. package/dist/rules/no-postmessage-star-origin.d.ts.map +1 -0
  281. package/dist/rules/no-postmessage-star-origin.js +58 -0
  282. package/dist/rules/no-postmessage-star-origin.js.map +1 -0
  283. package/dist/rules/no-postmessage-without-origin-allowlist.d.ts +5 -0
  284. package/dist/rules/no-postmessage-without-origin-allowlist.d.ts.map +1 -0
  285. package/dist/rules/no-postmessage-without-origin-allowlist.js +80 -0
  286. package/dist/rules/no-postmessage-without-origin-allowlist.js.map +1 -0
  287. package/dist/rules/no-range-create-contextual-fragment.d.ts +5 -0
  288. package/dist/rules/no-range-create-contextual-fragment.d.ts.map +1 -0
  289. package/dist/rules/no-range-create-contextual-fragment.js +64 -0
  290. package/dist/rules/no-range-create-contextual-fragment.js.map +1 -0
  291. package/dist/rules/no-script-src-data-url.d.ts +5 -0
  292. package/dist/rules/no-script-src-data-url.d.ts.map +1 -0
  293. package/dist/rules/no-script-src-data-url.js +108 -0
  294. package/dist/rules/no-script-src-data-url.js.map +1 -0
  295. package/dist/rules/no-script-text.d.ts +5 -0
  296. package/dist/rules/no-script-text.d.ts.map +1 -0
  297. package/dist/rules/no-script-text.js +52 -0
  298. package/dist/rules/no-script-text.js.map +1 -0
  299. package/dist/rules/no-service-worker-unsafe-script-url.d.ts +5 -0
  300. package/dist/rules/no-service-worker-unsafe-script-url.d.ts.map +1 -0
  301. package/dist/rules/no-service-worker-unsafe-script-url.js +52 -0
  302. package/dist/rules/no-service-worker-unsafe-script-url.js.map +1 -0
  303. package/dist/rules/no-set-html-unsafe.d.ts +5 -0
  304. package/dist/rules/no-set-html-unsafe.d.ts.map +1 -0
  305. package/dist/rules/no-set-html-unsafe.js +48 -0
  306. package/dist/rules/no-set-html-unsafe.js.map +1 -0
  307. package/dist/rules/no-trusted-types-policy-pass-through.d.ts +5 -0
  308. package/dist/rules/no-trusted-types-policy-pass-through.d.ts.map +1 -0
  309. package/dist/rules/no-trusted-types-policy-pass-through.js +115 -0
  310. package/dist/rules/no-trusted-types-policy-pass-through.js.map +1 -0
  311. package/dist/rules/no-unsafe-alloc.d.ts +5 -0
  312. package/dist/rules/no-unsafe-alloc.d.ts.map +1 -0
  313. package/dist/rules/no-unsafe-alloc.js +51 -0
  314. package/dist/rules/no-unsafe-alloc.js.map +1 -0
  315. package/dist/rules/no-unsafe-cast-to-trusted-types.d.ts +5 -0
  316. package/dist/rules/no-unsafe-cast-to-trusted-types.d.ts.map +1 -0
  317. package/dist/rules/no-unsafe-cast-to-trusted-types.js +89 -0
  318. package/dist/rules/no-unsafe-cast-to-trusted-types.js.map +1 -0
  319. package/dist/rules/no-window-open-without-noopener.d.ts +5 -0
  320. package/dist/rules/no-window-open-without-noopener.d.ts.map +1 -0
  321. package/dist/rules/no-window-open-without-noopener.js +84 -0
  322. package/dist/rules/no-window-open-without-noopener.js.map +1 -0
  323. package/dist/rules/no-winjs-html-unsafe.d.ts +5 -0
  324. package/dist/rules/no-winjs-html-unsafe.d.ts.map +1 -0
  325. package/dist/rules/no-winjs-html-unsafe.js +32 -0
  326. package/dist/rules/no-winjs-html-unsafe.js.map +1 -0
  327. package/dist/rules/no-worker-blob-url.d.ts +5 -0
  328. package/dist/rules/no-worker-blob-url.d.ts.map +1 -0
  329. package/dist/rules/no-worker-blob-url.js +64 -0
  330. package/dist/rules/no-worker-blob-url.js.map +1 -0
  331. package/dist/rules/no-worker-data-url.d.ts +5 -0
  332. package/dist/rules/no-worker-data-url.d.ts.map +1 -0
  333. package/dist/rules/no-worker-data-url.js +67 -0
  334. package/dist/rules/no-worker-data-url.js.map +1 -0
  335. package/docs/rules/getting-started.md +70 -0
  336. package/docs/rules/no-angular-bypass-sanitizer.md +69 -0
  337. package/docs/rules/no-angular-bypass-security-trust-html.md +59 -0
  338. package/docs/rules/no-angular-innerhtml-binding.md +59 -0
  339. package/docs/rules/no-angular-sanitization-trusted-urls.md +64 -0
  340. package/docs/rules/no-angularjs-bypass-sce.md +64 -0
  341. package/docs/rules/no-angularjs-enable-svg.md +59 -0
  342. package/docs/rules/no-angularjs-ng-bind-html-without-sanitize.md +59 -0
  343. package/docs/rules/no-angularjs-sanitization-whitelist.md +63 -0
  344. package/docs/rules/no-angularjs-sce-resource-url-wildcard.md +62 -0
  345. package/docs/rules/no-child-process-exec.md +101 -0
  346. package/docs/rules/no-child-process-shell-true.md +59 -0
  347. package/docs/rules/no-cookies.md +61 -0
  348. package/docs/rules/no-document-domain.md +59 -0
  349. package/docs/rules/no-document-execcommand-insert-html.md +69 -0
  350. package/docs/rules/no-document-parse-html-unsafe.md +72 -0
  351. package/docs/rules/no-document-write.md +64 -0
  352. package/docs/rules/no-domparser-html-without-sanitization.md +59 -0
  353. package/docs/rules/no-domparser-svg-without-sanitization.md +71 -0
  354. package/docs/rules/no-dynamic-import-unsafe-url.md +81 -0
  355. package/docs/rules/no-electron-allow-running-insecure-content.md +69 -0
  356. package/docs/rules/no-electron-dangerous-blink-features.md +77 -0
  357. package/docs/rules/no-electron-disable-context-isolation.md +69 -0
  358. package/docs/rules/no-electron-disable-sandbox.md +69 -0
  359. package/docs/rules/no-electron-disable-web-security.md +69 -0
  360. package/docs/rules/no-electron-enable-remote-module.md +69 -0
  361. package/docs/rules/no-electron-enable-webview-tag.md +77 -0
  362. package/docs/rules/no-electron-experimental-features.md +77 -0
  363. package/docs/rules/no-electron-expose-raw-ipc-renderer.md +79 -0
  364. package/docs/rules/no-electron-insecure-certificate-error-handler.md +72 -0
  365. package/docs/rules/no-electron-insecure-certificate-verify-proc.md +63 -0
  366. package/docs/rules/no-electron-insecure-permission-request-handler.md +67 -0
  367. package/docs/rules/no-electron-node-integration.md +70 -0
  368. package/docs/rules/no-electron-permission-check-handler-allow-all.md +66 -0
  369. package/docs/rules/no-electron-unchecked-ipc-sender.md +62 -0
  370. package/docs/rules/no-electron-unrestricted-navigation.md +64 -0
  371. package/docs/rules/no-electron-untrusted-open-external.md +65 -0
  372. package/docs/rules/no-electron-webview-allowpopups.md +59 -0
  373. package/docs/rules/no-electron-webview-insecure-webpreferences.md +84 -0
  374. package/docs/rules/no-electron-webview-node-integration.md +59 -0
  375. package/docs/rules/no-html-method.md +58 -0
  376. package/docs/rules/no-http-request-to-insecure-protocol.md +59 -0
  377. package/docs/rules/no-iframe-srcdoc.md +76 -0
  378. package/docs/rules/no-inner-html.md +65 -0
  379. package/docs/rules/no-insecure-random.md +66 -0
  380. package/docs/rules/no-insecure-tls-agent-options.md +59 -0
  381. package/docs/rules/no-insecure-url.md +72 -0
  382. package/docs/rules/no-location-javascript-url.md +59 -0
  383. package/docs/rules/no-message-event-without-origin-check.md +82 -0
  384. package/docs/rules/no-msapp-exec-unsafe.md +59 -0
  385. package/docs/rules/no-node-tls-check-server-identity-bypass.md +88 -0
  386. package/docs/rules/no-node-tls-legacy-protocol.md +80 -0
  387. package/docs/rules/no-node-tls-reject-unauthorized-zero.md +61 -0
  388. package/docs/rules/no-node-tls-security-level-zero.md +77 -0
  389. package/docs/rules/no-node-vm-run-in-context.md +89 -0
  390. package/docs/rules/no-node-vm-source-text-module.md +79 -0
  391. package/docs/rules/no-node-worker-threads-eval.md +82 -0
  392. package/docs/rules/no-nonnull-assertion-on-security-input.md +59 -0
  393. package/docs/rules/no-postmessage-star-origin.md +59 -0
  394. package/docs/rules/no-postmessage-without-origin-allowlist.md +59 -0
  395. package/docs/rules/no-range-create-contextual-fragment.md +64 -0
  396. package/docs/rules/no-script-src-data-url.md +83 -0
  397. package/docs/rules/no-script-text.md +80 -0
  398. package/docs/rules/no-service-worker-unsafe-script-url.md +85 -0
  399. package/docs/rules/no-set-html-unsafe.md +64 -0
  400. package/docs/rules/no-trusted-types-policy-pass-through.md +68 -0
  401. package/docs/rules/no-unsafe-alloc.md +62 -0
  402. package/docs/rules/no-unsafe-cast-to-trusted-types.md +59 -0
  403. package/docs/rules/no-window-open-without-noopener.md +63 -0
  404. package/docs/rules/no-winjs-html-unsafe.md +60 -0
  405. package/docs/rules/no-worker-blob-url.md +86 -0
  406. package/docs/rules/no-worker-data-url.md +85 -0
  407. package/docs/rules/overview.md +111 -0
  408. package/docs/rules/presets/angular.md +35 -0
  409. package/docs/rules/presets/angularjs.md +36 -0
  410. package/docs/rules/presets/common.md +59 -0
  411. package/docs/rules/presets/electron.md +51 -0
  412. package/docs/rules/presets/index.md +26 -0
  413. package/docs/rules/presets/node.md +43 -0
  414. package/docs/rules/presets/react.md +33 -0
  415. package/docs/rules/presets/recommended.md +104 -0
  416. package/docs/rules/presets/required.md +99 -0
  417. package/docs/rules/presets/typescript.md +34 -0
  418. package/package.json +583 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nick2bad4u
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,133 @@
1
+ # eslint-plugin-sdl-2
2
+
3
+ [![npm license.](https://flat.badgen.net/npm/license/eslint-plugin-sdl-2?color=purple)](https://github.com/Nick2bad4u/eslint-plugin-sdl-2/blob/main/LICENSE) [![npm total downloads.](https://flat.badgen.net/npm/dt/eslint-plugin-sdl-2?color=pink)](https://www.npmjs.com/package/eslint-plugin-sdl-2) [![latest GitHub release.](https://flat.badgen.net/github/release/Nick2bad4u/eslint-plugin-sdl-2?color=cyan)](https://github.com/Nick2bad4u/eslint-plugin-sdl-2/releases) [![GitHub stars.](https://flat.badgen.net/github/stars/Nick2bad4u/eslint-plugin-sdl-2?color=yellow)](https://github.com/Nick2bad4u/eslint-plugin-sdl-2/stargazers) [![GitHub forks.](https://flat.badgen.net/github/forks/Nick2bad4u/eslint-plugin-sdl-2?color=green)](https://github.com/Nick2bad4u/eslint-plugin-sdl-2/forks) [![GitHub open issues.](https://flat.badgen.net/github/open-issues/Nick2bad4u/eslint-plugin-sdl-2?color=red)](https://github.com/Nick2bad4u/eslint-plugin-sdl-2/issues) [![codecov.](https://codecov.io/gh/Nick2bad4u/eslint-plugin-sdl-2/branch/main/graph/badge.svg)](https://codecov.io/gh/Nick2bad4u/eslint-plugin-sdl-2)
4
+
5
+ SDL-focused ESLint plugin with modern flat-config presets and TypeScript-first rule implementations.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install --save-dev eslint eslint-plugin-sdl-2
11
+ ```
12
+
13
+ ## Usage (Flat Config)
14
+
15
+ ```ts
16
+ import sdl from "eslint-plugin-sdl-2";
17
+
18
+ export default [...sdl.configs.recommended];
19
+ ```
20
+
21
+ ## Presets
22
+
23
+ - `sdl.configs.common`
24
+ - `sdl.configs.typescript`
25
+ - `sdl.configs.angular`
26
+ - `sdl.configs.angularjs`
27
+ - `sdl.configs.node`
28
+ - `sdl.configs.react`
29
+ - `sdl.configs.electron`
30
+ - `sdl.configs.required`
31
+ - `sdl.configs.recommended`
32
+
33
+ ## Rules
34
+
35
+ - `Fix` legend:
36
+ - `🔧` = autofixable
37
+ - `💡` = suggestions available
38
+ - `—` = report only
39
+ - `Preset key` legend:
40
+ - [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) — [`sdl.configs.common`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common)
41
+ - [🔷](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/typescript) — [`sdl.configs.typescript`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/typescript)
42
+ - [🅰️](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/angular) — [`sdl.configs.angular`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/angular)
43
+ - [🧭](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/angularjs) — [`sdl.configs.angularjs`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/angularjs)
44
+ - [🟩](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/node) — [`sdl.configs.node`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/node)
45
+ - [⚛️](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/react) — [`sdl.configs.react`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/react)
46
+ - [⚡](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/electron) — [`sdl.configs.electron`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/electron)
47
+ - [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) — [`sdl.configs.required`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required)
48
+ - [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) — [`sdl.configs.recommended`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended)
49
+ - `⚛️ React` provides JSX parser context and intentionally has no SDL rule rows in this matrix.
50
+
51
+ | Rule | Fix | Preset key |
52
+ | --- | :-: | :-- |
53
+ | [`no-angular-bypass-sanitizer`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angular-bypass-sanitizer) | — | [🅰️](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/angular) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
54
+ | [`no-angular-bypass-security-trust-html`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angular-bypass-security-trust-html) | — | [🅰️](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/angular) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
55
+ | [`no-angular-innerhtml-binding`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angular-innerhtml-binding) | — | [🅰️](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/angular) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
56
+ | [`no-angular-sanitization-trusted-urls`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angular-sanitization-trusted-urls) | — | [🅰️](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/angular) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
57
+ | [`no-angularjs-bypass-sce`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angularjs-bypass-sce) | — | [🧭](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/angularjs) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
58
+ | [`no-angularjs-enable-svg`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angularjs-enable-svg) | — | [🧭](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/angularjs) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
59
+ | [`no-angularjs-ng-bind-html-without-sanitize`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angularjs-ng-bind-html-without-sanitize) | — | [🧭](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/angularjs) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
60
+ | [`no-angularjs-sanitization-whitelist`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angularjs-sanitization-whitelist) | — | [🧭](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/angularjs) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
61
+ | [`no-angularjs-sce-resource-url-wildcard`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angularjs-sce-resource-url-wildcard) | — | [🧭](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/angularjs) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
62
+ | [`no-child-process-exec`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-child-process-exec) | — | [🟩](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/node) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
63
+ | [`no-child-process-shell-true`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-child-process-shell-true) | — | [🟩](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/node) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
64
+ | [`no-cookies`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-cookies) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
65
+ | [`no-document-domain`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-document-domain) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
66
+ | [`no-document-execcommand-insert-html`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-document-execcommand-insert-html) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
67
+ | [`no-document-parse-html-unsafe`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-document-parse-html-unsafe) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
68
+ | [`no-document-write`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-document-write) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
69
+ | [`no-domparser-html-without-sanitization`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-domparser-html-without-sanitization) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
70
+ | [`no-domparser-svg-without-sanitization`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-domparser-svg-without-sanitization) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
71
+ | [`no-dynamic-import-unsafe-url`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-dynamic-import-unsafe-url) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
72
+ | [`no-electron-allow-running-insecure-content`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-allow-running-insecure-content) | 🔧 | [⚡](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/electron) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
73
+ | [`no-electron-dangerous-blink-features`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-dangerous-blink-features) | — | [⚡](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/electron) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
74
+ | [`no-electron-disable-context-isolation`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-disable-context-isolation) | 🔧 | [⚡](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/electron) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
75
+ | [`no-electron-disable-sandbox`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-disable-sandbox) | 🔧 | [⚡](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/electron) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
76
+ | [`no-electron-disable-web-security`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-disable-web-security) | 🔧 | [⚡](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/electron) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
77
+ | [`no-electron-enable-remote-module`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-enable-remote-module) | 🔧 | [⚡](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/electron) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
78
+ | [`no-electron-enable-webview-tag`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-enable-webview-tag) | 🔧 | [⚡](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/electron) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
79
+ | [`no-electron-experimental-features`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-experimental-features) | 🔧 | [⚡](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/electron) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
80
+ | [`no-electron-expose-raw-ipc-renderer`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-expose-raw-ipc-renderer) | — | [⚡](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/electron) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
81
+ | [`no-electron-insecure-certificate-error-handler`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-insecure-certificate-error-handler) | — | [⚡](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/electron) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
82
+ | [`no-electron-insecure-certificate-verify-proc`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-insecure-certificate-verify-proc) | — | [⚡](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/electron) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
83
+ | [`no-electron-insecure-permission-request-handler`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-insecure-permission-request-handler) | — | [⚡](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/electron) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
84
+ | [`no-electron-node-integration`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-node-integration) | 🔧 | [⚡](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/electron) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
85
+ | [`no-electron-permission-check-handler-allow-all`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-permission-check-handler-allow-all) | — | [⚡](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/electron) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
86
+ | [`no-electron-unchecked-ipc-sender`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-unchecked-ipc-sender) | — | [⚡](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/electron) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
87
+ | [`no-electron-unrestricted-navigation`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-unrestricted-navigation) | — | [⚡](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/electron) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
88
+ | [`no-electron-untrusted-open-external`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-untrusted-open-external) | — | [⚡](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/electron) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
89
+ | [`no-electron-webview-allowpopups`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-webview-allowpopups) | 🔧 | [⚡](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/electron) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
90
+ | [`no-electron-webview-insecure-webpreferences`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-webview-insecure-webpreferences) | — | [⚡](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/electron) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
91
+ | [`no-electron-webview-node-integration`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-webview-node-integration) | 🔧 | [⚡](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/electron) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
92
+ | [`no-html-method`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-html-method) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
93
+ | [`no-http-request-to-insecure-protocol`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-http-request-to-insecure-protocol) | 🔧 | [🟩](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/node) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
94
+ | [`no-iframe-srcdoc`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-iframe-srcdoc) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
95
+ | [`no-inner-html`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-inner-html) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
96
+ | [`no-insecure-random`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-insecure-random) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
97
+ | [`no-insecure-tls-agent-options`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-insecure-tls-agent-options) | 🔧 | [🟩](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/node) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
98
+ | [`no-insecure-url`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-insecure-url) | 🔧 | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
99
+ | [`no-location-javascript-url`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-location-javascript-url) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
100
+ | [`no-message-event-without-origin-check`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-message-event-without-origin-check) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
101
+ | [`no-msapp-exec-unsafe`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-msapp-exec-unsafe) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
102
+ | [`no-node-tls-check-server-identity-bypass`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-tls-check-server-identity-bypass) | — | [🟩](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/node) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
103
+ | [`no-node-tls-legacy-protocol`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-tls-legacy-protocol) | — | [🟩](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/node) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
104
+ | [`no-node-tls-reject-unauthorized-zero`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-tls-reject-unauthorized-zero) | 💡 | [🟩](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/node) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
105
+ | [`no-node-tls-security-level-zero`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-tls-security-level-zero) | — | [🟩](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/node) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
106
+ | [`no-node-vm-run-in-context`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-vm-run-in-context) | — | [🟩](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/node) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
107
+ | [`no-node-vm-source-text-module`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-vm-source-text-module) | — | [🟩](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/node) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
108
+ | [`no-node-worker-threads-eval`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-worker-threads-eval) | — | [🟩](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/node) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
109
+ | [`no-nonnull-assertion-on-security-input`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-nonnull-assertion-on-security-input) | — | [🔷](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/typescript) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
110
+ | [`no-postmessage-star-origin`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-postmessage-star-origin) | 💡 | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
111
+ | [`no-postmessage-without-origin-allowlist`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-postmessage-without-origin-allowlist) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
112
+ | [`no-range-create-contextual-fragment`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-range-create-contextual-fragment) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
113
+ | [`no-script-src-data-url`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-script-src-data-url) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
114
+ | [`no-script-text`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-script-text) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
115
+ | [`no-service-worker-unsafe-script-url`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-service-worker-unsafe-script-url) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
116
+ | [`no-set-html-unsafe`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-set-html-unsafe) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
117
+ | [`no-trusted-types-policy-pass-through`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-trusted-types-policy-pass-through) | — | [🔷](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/typescript) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
118
+ | [`no-unsafe-alloc`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-unsafe-alloc) | 🔧 | [🟩](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/node) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
119
+ | [`no-unsafe-cast-to-trusted-types`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-unsafe-cast-to-trusted-types) | — | [🔷](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/typescript) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
120
+ | [`no-window-open-without-noopener`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-window-open-without-noopener) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
121
+ | [`no-winjs-html-unsafe`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-winjs-html-unsafe) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
122
+ | [`no-worker-blob-url`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-worker-blob-url) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
123
+ | [`no-worker-data-url`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-worker-data-url) | — | [🟢](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/common) [✅](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/required) [⭐](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/presets/recommended) |
124
+
125
+ ## Development
126
+
127
+ ```bash
128
+ npm install
129
+ npm run build
130
+ npm run lint:fix:quiet
131
+ npm run typecheck
132
+ npm run test
133
+ ```
@@ -0,0 +1,17 @@
1
+ import type { TSESLint, TSESTree } from "@typescript-eslint/utils";
2
+ import type ts from "typescript";
3
+ type RuleContext = Readonly<TSESLint.RuleContext<string, unknown[]>>;
4
+ /** Returns `true` when parser services expose complete TypeScript program data. */
5
+ export declare const hasFullTypeInformation: (context: RuleContext) => boolean;
6
+ /** Returns the TypeScript type checker when parser services are available. */
7
+ export declare const getFullTypeChecker: (context: RuleContext) => ts.TypeChecker | undefined;
8
+ /** Resolve the textual type for an ESTree node via parser services. */
9
+ export declare const getNodeTypeAsString: (fullTypeChecker: Readonly<ts.TypeChecker> | undefined, node: null | Readonly<TSESTree.Node> | undefined, context: RuleContext) => string;
10
+ /**
11
+ * Best-effort check for the browser `Document` object.
12
+ *
13
+ * Falls back to syntactic checks when parser services are unavailable.
14
+ */
15
+ export declare const isDocumentObject: (node: Readonly<TSESTree.Node>, context: RuleContext, fullTypeChecker: Readonly<ts.TypeChecker> | undefined) => boolean;
16
+ export {};
17
+ //# sourceMappingURL=ast-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ast-utils.d.ts","sourceRoot":"","sources":["../../src/_internal/ast-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEnE,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAIjC,KAAK,WAAW,GAAG,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;AA8CrE,mFAAmF;AACnF,eAAO,MAAM,sBAAsB,GAAI,SAAS,WAAW,KAAG,OACrB,CAAC;AAE1C,8EAA8E;AAC9E,eAAO,MAAM,kBAAkB,GAC3B,SAAS,WAAW,KACrB,EAAE,CAAC,WAAW,GAAG,SACoC,CAAC;AAEzD,uEAAuE;AACvE,eAAO,MAAM,mBAAmB,GAC5B,iBAAiB,QAAQ,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,SAAS,EACrD,MAAM,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,SAAS,EAChD,SAAS,WAAW,KACrB,MAwBF,CAAC;AAuDF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GACzB,MAAM,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAC7B,SAAS,WAAW,EACpB,iBAAiB,QAAQ,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,SAAS,KACtD,OAgBF,CAAC"}
@@ -0,0 +1,93 @@
1
+ import { isDefined, safeCastTo } from "ts-extras";
2
+ const isMapLike = (value) => typeof value === "object" &&
3
+ value !== null &&
4
+ typeof safeCastTo(value).get === "function";
5
+ const isProgramLike = (value) => typeof value === "object" &&
6
+ value !== null &&
7
+ typeof safeCastTo(value).getTypeChecker ===
8
+ "function";
9
+ const isTypeScriptParserServices = (parserServices) => {
10
+ if (typeof parserServices !== "object" || parserServices === null) {
11
+ return false;
12
+ }
13
+ const candidate = safeCastTo(parserServices);
14
+ return (isProgramLike(candidate.program) &&
15
+ isMapLike(candidate.esTreeNodeToTSNodeMap) &&
16
+ isMapLike(candidate.tsNodeToESTreeNodeMap));
17
+ };
18
+ const getParserServices = (context) => {
19
+ const parserServices = context.sourceCode.parserServices;
20
+ return isTypeScriptParserServices(parserServices)
21
+ ? parserServices
22
+ : undefined;
23
+ };
24
+ /** Returns `true` when parser services expose complete TypeScript program data. */
25
+ export const hasFullTypeInformation = (context) => isDefined(getParserServices(context));
26
+ /** Returns the TypeScript type checker when parser services are available. */
27
+ export const getFullTypeChecker = (context) => getParserServices(context)?.program.getTypeChecker();
28
+ /** Resolve the textual type for an ESTree node via parser services. */
29
+ export const getNodeTypeAsString = (fullTypeChecker, node, context) => {
30
+ if (!isDefined(fullTypeChecker) || node === null || node === undefined) {
31
+ return "any";
32
+ }
33
+ const parserServices = getParserServices(context);
34
+ if (!isDefined(parserServices)) {
35
+ return "any";
36
+ }
37
+ const tsNode = parserServices.esTreeNodeToTSNodeMap.get(safeCastTo(node));
38
+ if (!isDefined(tsNode)) {
39
+ return "any";
40
+ }
41
+ const tsType = fullTypeChecker.getTypeAtLocation(safeCastTo(tsNode));
42
+ return fullTypeChecker.typeToString(tsType);
43
+ };
44
+ const isWindowIdentifierName = (name) => name.toLowerCase().endsWith("window");
45
+ const getMemberPropertyName = (node) => {
46
+ if (node.property.type === "Identifier") {
47
+ return node.property.name;
48
+ }
49
+ if (node.property.type === "Literal" &&
50
+ typeof node.property.value === "string") {
51
+ return node.property.value;
52
+ }
53
+ return undefined;
54
+ };
55
+ const isDocumentMemberReference = (node) => {
56
+ const propertyName = getMemberPropertyName(node);
57
+ if (propertyName !== "document") {
58
+ return false;
59
+ }
60
+ if (node.object.type === "Identifier") {
61
+ return isWindowIdentifierName(node.object.name);
62
+ }
63
+ if (node.object.type !== "MemberExpression") {
64
+ return false;
65
+ }
66
+ const nestedPropertyName = getMemberPropertyName(node.object);
67
+ if (nestedPropertyName !== "window") {
68
+ return false;
69
+ }
70
+ if (node.object.object.type === "ThisExpression") {
71
+ return true;
72
+ }
73
+ return (node.object.object.type === "Identifier" &&
74
+ node.object.object.name === "globalThis");
75
+ };
76
+ /**
77
+ * Best-effort check for the browser `Document` object.
78
+ *
79
+ * Falls back to syntactic checks when parser services are unavailable.
80
+ */
81
+ export const isDocumentObject = (node, context, fullTypeChecker) => {
82
+ if (fullTypeChecker !== undefined) {
83
+ return (getNodeTypeAsString(fullTypeChecker, node, context) === "Document");
84
+ }
85
+ if (node.type === "Identifier") {
86
+ return node.name === "document";
87
+ }
88
+ if (node.type === "MemberExpression") {
89
+ return isDocumentMemberReference(node);
90
+ }
91
+ return false;
92
+ };
93
+ //# sourceMappingURL=ast-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ast-utils.js","sourceRoot":"","sources":["../../src/_internal/ast-utils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAUlD,MAAM,SAAS,GAAG,CAAC,KAAc,EAAiC,EAAE,CAChE,OAAO,KAAK,KAAK,QAAQ;IACzB,KAAK,KAAK,IAAI;IACd,OAAO,UAAU,CAAoB,KAAK,CAAC,CAAC,GAAG,KAAK,UAAU,CAAC;AAEnE,MAAM,aAAa,GAAG,CAAC,KAAc,EAAuB,EAAE,CAC1D,OAAO,KAAK,KAAK,QAAQ;IACzB,KAAK,KAAK,IAAI;IACd,OAAO,UAAU,CAA+B,KAAK,CAAC,CAAC,cAAc;QACjE,UAAU,CAAC;AAEnB,MAAM,0BAA0B,GAAG,CAC/B,cAAuB,EACmB,EAAE;IAC5C,IAAI,OAAO,cAAc,KAAK,QAAQ,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;QAChE,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,MAAM,SAAS,GACX,UAAU,CAAoC,cAAc,CAAC,CAAC;IAElE,OAAO,CACH,aAAa,CAAC,SAAS,CAAC,OAAO,CAAC;QAChC,SAAS,CAAC,SAAS,CAAC,qBAAqB,CAAC;QAC1C,SAAS,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAC7C,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CACtB,OAAoB,EACgB,EAAE;IACtC,MAAM,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC;IAEzD,OAAO,0BAA0B,CAAC,cAAc,CAAC;QAC7C,CAAC,CAAC,cAAc;QAChB,CAAC,CAAC,SAAS,CAAC;AACpB,CAAC,CAAC;AAEF,mFAAmF;AACnF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,OAAoB,EAAW,EAAE,CACpE,SAAS,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;AAE1C,8EAA8E;AAC9E,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAC9B,OAAoB,EACM,EAAE,CAC5B,iBAAiB,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,cAAc,EAAE,CAAC;AAEzD,uEAAuE;AACvE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAC/B,eAAqD,EACrD,IAAgD,EAChD,OAAoB,EACd,EAAE;IACR,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACrE,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,MAAM,cAAc,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAElD,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,CAAC;QAC7B,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,MAAM,MAAM,GAAG,cAAc,CAAC,qBAAqB,CAAC,GAAG,CACnD,UAAU,CAAgB,IAAI,CAAC,CAClC,CAAC;IAEF,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;QACrB,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,MAAM,MAAM,GAAG,eAAe,CAAC,iBAAiB,CAC5C,UAAU,CAAU,MAAM,CAAC,CAC9B,CAAC;IAEF,OAAO,eAAe,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAG,CAAC,IAAY,EAAW,EAAE,CACrD,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAE1C,MAAM,qBAAqB,GAAG,CAC1B,IAAyC,EACvB,EAAE;IACpB,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;QACtC,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC9B,CAAC;IAED,IACI,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,SAAS;QAChC,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,KAAK,QAAQ,EACzC,CAAC;QACC,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;IAC/B,CAAC;IAED,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC;AAEF,MAAM,yBAAyB,GAAG,CAC9B,IAAyC,EAClC,EAAE;IACT,MAAM,YAAY,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAEjD,IAAI,YAAY,KAAK,UAAU,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;QACpC,OAAO,sBAAsB,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,kBAAkB,EAAE,CAAC;QAC1C,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAE9D,IAAI,kBAAkB,KAAK,QAAQ,EAAE,CAAC;QAClC,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,gBAAgB,EAAE,CAAC;QAC/C,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,CACH,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,YAAY;QACxC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,YAAY,CAC3C,CAAC;AACN,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC5B,IAA6B,EAC7B,OAAoB,EACpB,eAAqD,EAC9C,EAAE;IACT,IAAI,eAAe,KAAK,SAAS,EAAE,CAAC;QAChC,OAAO,CACH,mBAAmB,CAAC,eAAe,EAAE,IAAI,EAAE,OAAO,CAAC,KAAK,UAAU,CACrE,CAAC;IACN,CAAC;IAED,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC;IACpC,CAAC;IAED,IAAI,IAAI,CAAC,IAAI,KAAK,kBAAkB,EAAE,CAAC;QACnC,OAAO,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ /** Ordered list of built-in SDL flat-config preset names. */
2
+ export declare const sdlConfigNames: readonly ["angular", "angularjs", "common", "electron", "node", "react", "typescript", "required", "recommended"];
3
+ /** Union of supported SDL flat-config preset names. */
4
+ export type SdlConfigName = (typeof sdlConfigNames)[number];
5
+ //# sourceMappingURL=config-references.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-references.d.ts","sourceRoot":"","sources":["../../src/_internal/config-references.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,eAAO,MAAM,cAAc,mHAUjB,CAAC;AAEX,uDAAuD;AACvD,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ /** Ordered list of built-in SDL flat-config preset names. */
2
+ export const sdlConfigNames = [
3
+ "angular",
4
+ "angularjs",
5
+ "common",
6
+ "electron",
7
+ "node",
8
+ "react",
9
+ "typescript",
10
+ "required",
11
+ "recommended",
12
+ ];
13
+ //# sourceMappingURL=config-references.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-references.js","sourceRoot":"","sources":["../../src/_internal/config-references.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,SAAS;IACT,WAAW;IACX,QAAQ;IACR,UAAU;IACV,MAAM;IACN,OAAO;IACP,YAAY;IACZ,UAAU;IACV,aAAa;CACP,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { TSESLint } from "@typescript-eslint/utils";
2
+ import { ESLintUtils } from "@typescript-eslint/utils";
3
+ type SdlRuleDocs = TSESLint.RuleMetaDataDocs & {
4
+ recommended: boolean;
5
+ };
6
+ /** Shared SDL rule helper that injects canonical docs URLs. */
7
+ export declare const createRule: ReturnType<typeof ESLintUtils.RuleCreator<SdlRuleDocs>>;
8
+ export {};
9
+ //# sourceMappingURL=create-rule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-rule.d.ts","sourceRoot":"","sources":["../../src/_internal/create-rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,KAAK,WAAW,GAAG,QAAQ,CAAC,gBAAgB,GAAG;IAC3C,WAAW,EAAE,OAAO,CAAC;CACxB,CAAC;AAKF,+DAA+D;AAC/D,eAAO,MAAM,UAAU,EAAE,UAAU,CAC/B,OAAO,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,CAG9C,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { ESLintUtils } from "@typescript-eslint/utils";
2
+ const docsBaseUrl = "https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules";
3
+ /** Shared SDL rule helper that injects canonical docs URLs. */
4
+ export const createRule = ESLintUtils.RuleCreator(// eslint-disable-line total-functions/no-hidden-type-assertions -- RuleCreator must be specialized with plugin docs metadata so `meta.docs.recommended` is strongly typed.
5
+ (name) => `${docsBaseUrl}/${name}`);
6
+ //# sourceMappingURL=create-rule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-rule.js","sourceRoot":"","sources":["../../src/_internal/create-rule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAMvD,MAAM,WAAW,GACb,6DAA6D,CAAC;AAElE,+DAA+D;AAC/D,MAAM,CAAC,MAAM,UAAU,GAEnB,WAAW,CAAC,WAAW,CAAe,2KAA2K;AACjN,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,WAAW,IAAI,IAAI,EAAE,CACrC,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { TSESTree } from "@typescript-eslint/utils";
2
+ /**
3
+ * Check whether a call is `new DOMParser().parseFromString(...)`.
4
+ *
5
+ * @param node - Call expression to inspect.
6
+ *
7
+ * @returns Whether the call matches the DOMParser parsing sink.
8
+ */
9
+ export declare const isDomParserParseFromStringCall: (node: Readonly<TSESTree.CallExpression>) => boolean;
10
+ /**
11
+ * Check whether an expression appears to run through a sanitizer or trusted
12
+ * policy helper.
13
+ *
14
+ * @param node - Expression to inspect.
15
+ *
16
+ * @returns Whether the expression is an explicit sanitization call.
17
+ */
18
+ export declare const isSanitizedExpression: (node: Readonly<TSESTree.Expression>) => boolean;
19
+ //# sourceMappingURL=domparser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domparser.d.ts","sourceRoot":"","sources":["../../src/_internal/domparser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAMzD;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,GACvC,MAAM,QAAQ,CAAC,QAAQ,CAAC,cAAc,CAAC,KACxC,OAiBF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GAC9B,MAAM,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,KACpC,OAmBF,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { getMemberPropertyName } from "./estree-utils.js";
2
+ const SANITIZER_NAME_PATTERN = /createhtml|sanitize|trusted/u;
3
+ /**
4
+ * Check whether a call is `new DOMParser().parseFromString(...)`.
5
+ *
6
+ * @param node - Call expression to inspect.
7
+ *
8
+ * @returns Whether the call matches the DOMParser parsing sink.
9
+ */
10
+ export const isDomParserParseFromStringCall = (node) => {
11
+ if (node.callee.type !== "MemberExpression") {
12
+ return false;
13
+ }
14
+ if (getMemberPropertyName(node.callee) !== "parseFromString") {
15
+ return false;
16
+ }
17
+ if (node.callee.object.type !== "NewExpression") {
18
+ return false;
19
+ }
20
+ return (node.callee.object.callee.type === "Identifier" &&
21
+ node.callee.object.callee.name === "DOMParser");
22
+ };
23
+ /**
24
+ * Check whether an expression appears to run through a sanitizer or trusted
25
+ * policy helper.
26
+ *
27
+ * @param node - Expression to inspect.
28
+ *
29
+ * @returns Whether the expression is an explicit sanitization call.
30
+ */
31
+ export const isSanitizedExpression = (node) => {
32
+ if (node.type !== "CallExpression") {
33
+ return false;
34
+ }
35
+ if (node.callee.type === "Identifier") {
36
+ return SANITIZER_NAME_PATTERN.test(node.callee.name.toLowerCase());
37
+ }
38
+ if (node.callee.type !== "MemberExpression") {
39
+ return false;
40
+ }
41
+ const propertyName = getMemberPropertyName(node.callee);
42
+ return (typeof propertyName === "string" &&
43
+ SANITIZER_NAME_PATTERN.test(propertyName.toLowerCase()));
44
+ };
45
+ //# sourceMappingURL=domparser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domparser.js","sourceRoot":"","sources":["../../src/_internal/domparser.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,MAAM,sBAAsB,GAAG,8BAA8B,CAAC;AAE9D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAC1C,IAAuC,EAChC,EAAE;IACT,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,kBAAkB,EAAE,CAAC;QAC1C,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,IAAI,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,iBAAiB,EAAE,CAAC;QAC3D,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,eAAe,EAAE,CAAC;QAC9C,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,OAAO,CACH,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,YAAY;QAC/C,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,WAAW,CACjD,CAAC;AACN,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACjC,IAAmC,EAC5B,EAAE;IACT,IAAI,IAAI,CAAC,IAAI,KAAK,gBAAgB,EAAE,CAAC;QACjC,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;QACpC,OAAO,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;IACvE,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,kBAAkB,EAAE,CAAC;QAC1C,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,MAAM,YAAY,GAAG,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAExD,OAAO,CACH,OAAO,YAAY,KAAK,QAAQ;QAChC,sBAAsB,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC,CAC1D,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { TSESLint } from "@typescript-eslint/utils";
2
+ type ElectronPreferenceMessageIds = "default";
3
+ type ElectronWebPreferenceCheck = Readonly<{
4
+ disallowedValue: boolean;
5
+ preferenceName: string;
6
+ }>;
7
+ type RuleContext = Readonly<TSESLint.RuleContext<ElectronPreferenceMessageIds, unknown[]>>;
8
+ /**
9
+ * Creates a listener that reports unsafe boolean Electron `webPreferences`
10
+ * values.
11
+ */
12
+ export declare const createElectronWebPreferencesBooleanListener: (context: RuleContext, check: ElectronWebPreferenceCheck) => TSESLint.RuleListener;
13
+ export {};
14
+ //# sourceMappingURL=electron-web-preferences.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"electron-web-preferences.d.ts","sourceRoot":"","sources":["../../src/_internal/electron-web-preferences.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAEnE,KAAK,4BAA4B,GAAG,SAAS,CAAC;AAE9C,KAAK,0BAA0B,GAAG,QAAQ,CAAC;IACvC,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;CAC1B,CAAC,CAAC;AAEH,KAAK,WAAW,GAAG,QAAQ,CACvB,QAAQ,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,EAAE,CAAC,CAChE,CAAC;AAkDF;;;GAGG;AACH,eAAO,MAAM,2CAA2C,GACpD,SAAS,WAAW,EACpB,OAAO,0BAA0B,KAClC,QAAQ,CAAC,YA8CV,CAAC"}
@@ -0,0 +1,63 @@
1
+ const getPropertyName = (property) => {
2
+ if (property.computed) {
3
+ return undefined;
4
+ }
5
+ if (property.key.type === "Identifier") {
6
+ return property.key.name;
7
+ }
8
+ if (property.key.type === "Literal" &&
9
+ typeof property.key.value === "string") {
10
+ return property.key.value;
11
+ }
12
+ return undefined;
13
+ };
14
+ const getPropertyByName = (objectExpression, propertyName) => {
15
+ for (const propertyNode of objectExpression.properties) {
16
+ if (propertyNode.type !== "Property" || propertyNode.kind !== "init") {
17
+ continue;
18
+ }
19
+ if (getPropertyName(propertyNode) === propertyName) {
20
+ return propertyNode;
21
+ }
22
+ }
23
+ return undefined;
24
+ };
25
+ const getBooleanLiteralValue = (valueNode) => {
26
+ if (valueNode.type !== "Literal" || typeof valueNode.value !== "boolean") {
27
+ return undefined;
28
+ }
29
+ return valueNode.value;
30
+ };
31
+ /**
32
+ * Creates a listener that reports unsafe boolean Electron `webPreferences`
33
+ * values.
34
+ */
35
+ export const createElectronWebPreferencesBooleanListener = (context, check) => ({
36
+ "NewExpression[callee.name=/^(?:BrowserWindow|BrowserView)$/]"(node) {
37
+ const [firstArgument] = node.arguments;
38
+ if (firstArgument?.type !== "ObjectExpression") {
39
+ return;
40
+ }
41
+ const webPreferencesProperty = getPropertyByName(firstArgument, "webPreferences");
42
+ if (webPreferencesProperty?.value.type !== "ObjectExpression") {
43
+ return;
44
+ }
45
+ const preferenceProperty = getPropertyByName(webPreferencesProperty.value, check.preferenceName);
46
+ if (preferenceProperty === undefined) {
47
+ return;
48
+ }
49
+ const preferenceValueNode = preferenceProperty.value;
50
+ const literalValue = getBooleanLiteralValue(preferenceValueNode);
51
+ if (literalValue !== check.disallowedValue) {
52
+ return;
53
+ }
54
+ context.report({
55
+ fix(fixer) {
56
+ return fixer.replaceText(preferenceValueNode, String(!check.disallowedValue));
57
+ },
58
+ messageId: "default",
59
+ node: preferenceProperty,
60
+ });
61
+ },
62
+ });
63
+ //# sourceMappingURL=electron-web-preferences.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"electron-web-preferences.js","sourceRoot":"","sources":["../../src/_internal/electron-web-preferences.ts"],"names":[],"mappings":"AAaA,MAAM,eAAe,GAAG,CACpB,QAAqC,EACnB,EAAE;IACpB,IAAI,QAAQ,CAAC,QAAQ,EAAE,CAAC;QACpB,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;QACrC,OAAO,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;IAC7B,CAAC;IAED,IACI,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,SAAS;QAC/B,OAAO,QAAQ,CAAC,GAAG,CAAC,KAAK,KAAK,QAAQ,EACxC,CAAC;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC;IAC9B,CAAC;IAED,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CACtB,gBAAqD,EACrD,YAAoB,EACS,EAAE;IAC/B,KAAK,MAAM,YAAY,IAAI,gBAAgB,CAAC,UAAU,EAAE,CAAC;QACrD,IAAI,YAAY,CAAC,IAAI,KAAK,UAAU,IAAI,YAAY,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;YACnE,SAAS;QACb,CAAC;QAED,IAAI,eAAe,CAAC,YAAY,CAAC,KAAK,YAAY,EAAE,CAAC;YACjD,OAAO,YAAY,CAAC;QACxB,CAAC;IACL,CAAC;IAED,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAG,CAC3B,SAAkC,EACf,EAAE;IACrB,IAAI,SAAS,CAAC,IAAI,KAAK,SAAS,IAAI,OAAO,SAAS,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;QACvE,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,OAAO,SAAS,CAAC,KAAK,CAAC;AAC3B,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,2CAA2C,GAAG,CACvD,OAAoB,EACpB,KAAiC,EACZ,EAAE,CAAC,CAAC;IACzB,8DAA8D,CAC1D,IAAsC;QAEtC,MAAM,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;QAEvC,IAAI,aAAa,EAAE,IAAI,KAAK,kBAAkB,EAAE,CAAC;YAC7C,OAAO;QACX,CAAC;QAED,MAAM,sBAAsB,GAAG,iBAAiB,CAC5C,aAAa,EACb,gBAAgB,CACnB,CAAC;QAEF,IAAI,sBAAsB,EAAE,KAAK,CAAC,IAAI,KAAK,kBAAkB,EAAE,CAAC;YAC5D,OAAO;QACX,CAAC;QAED,MAAM,kBAAkB,GAAG,iBAAiB,CACxC,sBAAsB,CAAC,KAAK,EAC5B,KAAK,CAAC,cAAc,CACvB,CAAC;QAEF,IAAI,kBAAkB,KAAK,SAAS,EAAE,CAAC;YACnC,OAAO;QACX,CAAC;QAED,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,KAAK,CAAC;QACrD,MAAM,YAAY,GAAG,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;QAEjE,IAAI,YAAY,KAAK,KAAK,CAAC,eAAe,EAAE,CAAC;YACzC,OAAO;QACX,CAAC;QAED,OAAO,CAAC,MAAM,CAAC;YACX,GAAG,CAAC,KAAK;gBACL,OAAO,KAAK,CAAC,WAAW,CACpB,mBAAmB,EACnB,MAAM,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CACjC,CAAC;YACN,CAAC;YACD,SAAS,EAAE,SAAS;YACpB,IAAI,EAAE,kBAAkB;SAC3B,CAAC,CAAC;IACP,CAAC;CACJ,CAAC,CAAC"}
@@ -0,0 +1,51 @@
1
+ import type { TSESTree } from "@typescript-eslint/utils";
2
+ /**
3
+ * Get the static property name accessed by a member expression.
4
+ *
5
+ * Returns `undefined` for computed members whose property key cannot be
6
+ * resolved to a static string.
7
+ *
8
+ * @param memberExpression - Member expression to inspect.
9
+ *
10
+ * @returns Static property name when available.
11
+ */
12
+ export declare const getMemberPropertyName: (memberExpression: Readonly<TSESTree.MemberExpression>) => string | undefined;
13
+ /**
14
+ * Get the static key name for an object literal property.
15
+ *
16
+ * @param property - Object property node to inspect.
17
+ *
18
+ * @returns Static property key when available.
19
+ */
20
+ export declare const getPropertyName: (property: Readonly<TSESTree.Property>) => string | undefined;
21
+ /**
22
+ * Find an initialized object literal property by its static key name.
23
+ *
24
+ * @param objectExpression - Object expression to search.
25
+ * @param propertyName - Property name to match.
26
+ *
27
+ * @returns Matching property node when present.
28
+ */
29
+ export declare const getPropertyByName: (objectExpression: Readonly<TSESTree.ObjectExpression>, propertyName: string) => TSESTree.Property | undefined;
30
+ /**
31
+ * Resolve a string value from a static expression.
32
+ *
33
+ * Supports plain string literals and template literals without expressions.
34
+ *
35
+ * @param node - Expression node to inspect.
36
+ *
37
+ * @returns Static string value when available.
38
+ */
39
+ export declare const getStaticStringValue: (node: Readonly<TSESTree.Expression>) => string | undefined;
40
+ /**
41
+ * Resolve a string value from a JSX attribute value.
42
+ *
43
+ * Supports plain string literals and JSX expression containers that wrap a
44
+ * static string literal or expression-free template literal.
45
+ *
46
+ * @param attributeValue - JSX attribute value node to inspect.
47
+ *
48
+ * @returns Static string value when available.
49
+ */
50
+ export declare const getStaticJsxAttributeStringValue: (attributeValue: Readonly<TSESTree.JSXAttribute["value"]>) => string | undefined;
51
+ //# sourceMappingURL=estree-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"estree-utils.d.ts","sourceRoot":"","sources":["../../src/_internal/estree-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,GAC9B,kBAAkB,QAAQ,CAAC,QAAQ,CAAC,gBAAgB,CAAC,KACtD,MAAM,GAAG,SAgBX,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GACxB,UAAU,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,KACtC,MAAM,GAAG,SAiBX,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,GAC1B,kBAAkB,QAAQ,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EACrD,cAAc,MAAM,KACrB,QAAQ,CAAC,QAAQ,GAAG,SAYtB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,GAC7B,MAAM,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,KACpC,MAAM,GAAG,SAUX,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,gCAAgC,GACzC,gBAAgB,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,KACzD,MAAM,GAAG,SAkCX,CAAC"}