eslint-plugin-sdl-2

July 3, 2026 ยท View on GitHub

npm license. npm total downloads. latest GitHub release. GitHub stars. GitHub forks. GitHub open issues. codecov.

SDL-focused ESLint plugin with modern flat-config presets and TypeScript-first rule implementations.

Installation

npm install --save-dev eslint eslint-plugin-sdl-2

Usage (Flat Config)

import sdl from "eslint-plugin-sdl-2";

export default [...sdl.configs.recommended];

Presets

  • sdl.configs.common
  • sdl.configs.typescript
  • sdl.configs.angular
  • sdl.configs.angularjs
  • sdl.configs.node
  • sdl.configs.react
  • sdl.configs.electron
  • sdl.configs.required
  • sdl.configs.recommended

Rules

RuleFixPreset key
no-angular-bypass-sanitizerโ€”๐Ÿ…ฐ๏ธ โœ… โญ
no-angular-bypass-security-trust-htmlโ€”๐Ÿ…ฐ๏ธ โœ… โญ
no-angular-innerhtml-bindingโ€”๐Ÿ…ฐ๏ธ โœ… โญ
no-angular-sanitization-trusted-urlsโ€”๐Ÿ…ฐ๏ธ โœ… โญ
no-angularjs-bypass-sceโ€”๐Ÿงญ โœ… โญ
no-angularjs-enable-svgโ€”๐Ÿงญ โœ… โญ
no-angularjs-ng-bind-html-without-sanitizeโ€”๐Ÿงญ โœ… โญ
no-angularjs-sanitization-whitelistโ€”๐Ÿงญ โœ… โญ
no-angularjs-sce-resource-url-wildcardโ€”๐Ÿงญ โœ… โญ
no-child-process-execโ€”๐ŸŸฉ โœ… โญ
no-child-process-shell-trueโ€”๐ŸŸฉ โœ… โญ
no-cookiesโ€”๐ŸŸข โœ… โญ
no-document-domainโ€”๐ŸŸข โœ… โญ
no-document-execcommand-insert-htmlโ€”๐ŸŸข โœ… โญ
no-document-parse-html-unsafeโ€”๐ŸŸข โœ… โญ
no-document-writeโ€”๐ŸŸข โœ… โญ
no-domparser-html-without-sanitizationโ€”๐ŸŸข โœ… โญ
no-domparser-svg-without-sanitizationโ€”๐ŸŸข โœ… โญ
no-dynamic-import-unsafe-urlโ€”๐ŸŸข โœ… โญ
no-electron-allow-running-insecure-content๐Ÿ”งโšก โœ… โญ
no-electron-dangerous-blink-featuresโ€”โšก โœ… โญ
no-electron-disable-context-isolation๐Ÿ”งโšก โœ… โญ
no-electron-disable-sandbox๐Ÿ”งโšก โœ… โญ
no-electron-disable-web-security๐Ÿ”งโšก โœ… โญ
no-electron-enable-remote-module๐Ÿ”งโšก โœ… โญ
no-electron-enable-webview-tag๐Ÿ”งโšก โœ… โญ
no-electron-experimental-features๐Ÿ”งโšก โœ… โญ
no-electron-expose-raw-ipc-rendererโ€”โšก โœ… โญ
no-electron-insecure-certificate-error-handlerโ€”โšก โœ… โญ
no-electron-insecure-certificate-verify-procโ€”โšก โœ… โญ
no-electron-insecure-permission-request-handlerโ€”โšก โœ… โญ
no-electron-node-integration๐Ÿ”งโšก โœ… โญ
no-electron-permission-check-handler-allow-allโ€”โšก โœ… โญ
no-electron-unchecked-ipc-senderโ€”โšก โœ… โญ
no-electron-unrestricted-navigationโ€”โšก โœ… โญ
no-electron-untrusted-open-externalโ€”โšก โœ… โญ
no-electron-webview-allowpopups๐Ÿ”งโšก โœ… โญ
no-electron-webview-insecure-webpreferencesโ€”โšก โœ… โญ
no-electron-webview-node-integration๐Ÿ”งโšก โœ… โญ
no-html-methodโ€”๐ŸŸข โœ… โญ
no-http-request-to-insecure-protocol๐Ÿ”ง๐ŸŸฉ โœ… โญ
no-iframe-srcdocโ€”๐ŸŸข โœ… โญ
no-inner-htmlโ€”๐ŸŸข โœ… โญ
no-insecure-randomโ€”๐ŸŸข โœ… โญ
no-insecure-tls-agent-options๐Ÿ”ง๐ŸŸฉ โœ… โญ
no-insecure-url๐Ÿ”ง๐ŸŸข โœ… โญ
no-location-javascript-urlโ€”๐ŸŸข โœ… โญ
no-message-event-without-origin-checkโ€”๐ŸŸข โœ… โญ
no-msapp-exec-unsafeโ€”๐ŸŸข โœ… โญ
no-node-tls-check-server-identity-bypassโ€”๐ŸŸฉ โœ… โญ
no-node-tls-legacy-protocolโ€”๐ŸŸฉ โœ… โญ
no-node-tls-reject-unauthorized-zero๐Ÿ’ก๐ŸŸฉ โœ… โญ
no-node-tls-security-level-zeroโ€”๐ŸŸฉ โœ… โญ
no-node-vm-run-in-contextโ€”๐ŸŸฉ โœ… โญ
no-node-vm-source-text-moduleโ€”๐ŸŸฉ โœ… โญ
no-node-worker-threads-evalโ€”๐ŸŸฉ โœ… โญ
no-nonnull-assertion-on-security-inputโ€”๐Ÿ”ท โญ
no-postmessage-star-origin๐Ÿ’ก๐ŸŸข โœ… โญ
no-postmessage-without-origin-allowlistโ€”๐ŸŸข โœ… โญ
no-range-create-contextual-fragmentโ€”๐ŸŸข โœ… โญ
no-script-src-data-urlโ€”๐ŸŸข โœ… โญ
no-script-textโ€”๐ŸŸข โœ… โญ
no-service-worker-unsafe-script-urlโ€”๐ŸŸข โœ… โญ
no-set-html-unsafeโ€”๐ŸŸข โœ… โญ
no-trusted-types-policy-pass-throughโ€”๐Ÿ”ท โญ
no-unsafe-alloc๐Ÿ”ง๐ŸŸฉ โœ… โญ
no-unsafe-cast-to-trusted-typesโ€”๐Ÿ”ท โญ
no-window-open-without-noopenerโ€”๐ŸŸข โœ… โญ
no-winjs-html-unsafeโ€”๐ŸŸข โœ… โญ
no-worker-blob-urlโ€”๐ŸŸข โœ… โญ
no-worker-data-urlโ€”๐ŸŸข โœ… โญ

Development

npm install
npm run build
npm run lint:fix:quiet
npm run typecheck
npm run test