eslint-plugin-sdl-2 1.2.1 → 1.2.2

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/plugin.cjs CHANGED
@@ -42,7 +42,7 @@ var import_eslint_plugin_security = __toESM(require("eslint-plugin-security"), 1
42
42
  var package_default = {
43
43
  $schema: "https://www.schemastore.org/package.json",
44
44
  name: "eslint-plugin-sdl-2",
45
- version: "1.2.1",
45
+ version: "1.2.2",
46
46
  private: false,
47
47
  description: "ESLint plugin providing SDL-focused security and platform hardening rules.",
48
48
  keywords: [
@@ -119,7 +119,7 @@ var package_default = {
119
119
  build: "tsc -p tsconfig.build.json && npm run build:types:cjs && npm run build:cjs",
120
120
  "build:cjs": 'esbuild dist/plugin.js --bundle --format=cjs --platform=node --packages=external --sourcemap --outfile=dist/plugin.cjs --footer:js="module.exports = module.exports.default;"',
121
121
  "build:clean": `node -e "require('node:fs').rmSync('dist',{recursive:true,force:true})"`,
122
- "build:eslint-inspector": 'npx -y @eslint/config-inspector@1.4.2 build --outDir "docs/docusaurus/static/eslint-inspector" --base "/eslint-plugin-SDL-2/eslint-inspector/"',
122
+ "build:eslint-inspector": 'npx -y @eslint/config-inspector@latest build --outDir "docs/docusaurus/static/eslint-inspector" --base "/eslint-plugin-SDL-2/eslint-inspector/"',
123
123
  "build:eslint-inspector:local": "npx @eslint/config-inspector",
124
124
  "build:stylelint-inspector": 'npx -y stylelint-config-inspector@latest build --outDir "docs/docusaurus/static/stylelint-inspector" --base "/eslint-plugin-SDL-2/stylelint-inspector/"',
125
125
  "build:stylelint-inspector:local": "npx stylelint-config-inspector@latest",
@@ -259,11 +259,11 @@ var package_default = {
259
259
  },
260
260
  dependencies: {
261
261
  "@types/eslint-plugin-security": "^3.0.1",
262
- "@typescript-eslint/eslint-plugin": "^8.59.1",
263
- "@typescript-eslint/parser": "^8.59.1",
264
- "@typescript-eslint/type-utils": "^8.59.1",
265
- "@typescript-eslint/utils": "^8.59.1",
266
- "eslint-plugin-n": "^17.24.0",
262
+ "@typescript-eslint/eslint-plugin": "^8.59.2",
263
+ "@typescript-eslint/parser": "^8.59.2",
264
+ "@typescript-eslint/type-utils": "^8.59.2",
265
+ "@typescript-eslint/utils": "^8.59.2",
266
+ "eslint-plugin-n": "^18.0.1",
267
267
  "ts-extras": "^1.0.0",
268
268
  "type-fest": "^5.6.0"
269
269
  },
@@ -271,8 +271,8 @@ var package_default = {
271
271
  "@arethetypeswrong/cli": "^0.18.2",
272
272
  "@csstools/stylelint-formatter-github": "^2.0.0",
273
273
  "@double-great/remark-lint-alt-text": "^1.1.1",
274
- "@eslint/compat": "^2.0.5",
275
- "@eslint/config-inspector": "^2.0.0",
274
+ "@eslint/compat": "^2.1.0",
275
+ "@eslint/config-inspector": "^2.0.1",
276
276
  "@microsoft/tsdoc-config": "^0.18.1",
277
277
  "@stryker-ignorer/console-all": "^0.3.2",
278
278
  "@stryker-mutator/core": "^9.6.1",
@@ -280,76 +280,56 @@ var package_default = {
280
280
  "@stryker-mutator/vitest-runner": "^9.6.1",
281
281
  "@types/htmlhint": "^1.1.5",
282
282
  "@types/madge": "^5.0.3",
283
- "@types/node": "^25.6.0",
284
- "@types/postcss-clamp": "^4.1.3",
285
- "@types/postcss-flexbugs-fixes": "^5.0.3",
286
- "@types/postcss-html": "^1.5.3",
287
- "@types/postcss-import": "^14.0.3",
288
- "@types/postcss-inline-svg": "^5.0.4",
289
- "@types/postcss-normalize": "^9.0.4",
290
- "@types/postcss-reporter": "^7.0.5",
283
+ "@types/node": "^25.6.2",
291
284
  "@types/sloc": "^0.2.3",
292
- "@typescript-eslint/rule-tester": "^8.59.1",
285
+ "@typescript-eslint/rule-tester": "^8.59.2",
293
286
  "@vitest/coverage-v8": "^4.1.5",
294
287
  "@vitest/ui": "^4.1.5",
295
288
  actionlint: "^2.0.6",
296
289
  "all-contributors-cli": "^6.26.1",
297
290
  "cognitive-complexity-ts": "^0.8.1",
298
- commitlint: "^20.5.3",
291
+ commitlint: "^21.0.0",
299
292
  "commitlint-config-gitmoji": "^2.3.1",
300
293
  "cross-env": "^10.1.0",
301
294
  depcheck: "^1.4.7",
302
295
  "detect-secrets": "^1.0.6",
303
296
  eslint: "^10.3.0",
304
- "eslint-config-nick2bad4u": "^1.0.11",
297
+ "eslint-config-nick2bad4u": "^1.0.12",
305
298
  "eslint-formatter-unix": "^9.0.1",
306
299
  "eslint-rule-benchmark": "^0.8.0",
307
300
  "fast-check": "^4.7.0",
308
301
  "git-cliff": "^2.13.1",
309
302
  "gitleaks-secret-scanner": "^2.1.1",
310
303
  htmlhint: "^1.9.2",
311
- jscpd: "^4.0.9",
312
- knip: "^6.11.0",
304
+ jscpd: "^4.1.0",
305
+ knip: "^6.12.2",
313
306
  leasot: "^14.4.0",
314
307
  madge: "^8.0.0",
315
308
  "markdown-link-check": "^3.14.2",
316
- "npm-check-updates": "^22.1.0",
309
+ "npm-check-updates": "^22.1.1",
317
310
  "npm-package-json-lint": "^10.4.0",
318
311
  picocolors: "^1.1.1",
319
- postcss: "^8.5.13",
320
- "postcss-assets": "^6.0.0",
321
- "postcss-clamp": "^4.1.0",
322
- "postcss-combine-duplicated-selectors": "^10.0.3",
323
- "postcss-flexbugs-fixes": "^5.0.2",
324
- "postcss-import": "^16.1.1",
325
- "postcss-inline-svg": "^6.0.0",
326
- "postcss-logical": "^9.0.0",
327
- "postcss-normalize": "^13.0.1",
328
- "postcss-reporter": "^7.1.0",
329
- "postcss-round-subpixels": "^2.0.0",
330
- "postcss-sort-media-queries": "^6.5.0",
331
- "postcss-viewport-height-correction": "^1.1.1",
332
312
  prettier: "^3.8.3",
333
- "prettier-config-nick2bad4u": "^1.0.9",
334
- publint: "^0.3.18",
313
+ "prettier-config-nick2bad4u": "^1.0.10",
314
+ publint: "^0.3.20",
335
315
  "rehype-katex": "^7.0.1",
336
316
  remark: "^15.0.1",
337
317
  "remark-cli": "^12.0.1",
338
318
  "remark-config-nick2bad4u": "^1.0.1",
339
319
  rimraf: "^6.1.3",
340
- secretlint: "^12.3.1",
341
- "secretlint-config-nick2bad4u": "^1.0.3",
320
+ secretlint: "^13.0.0",
321
+ "secretlint-config-nick2bad4u": "^1.0.4",
342
322
  sloc: "^0.3.2",
343
323
  "sort-package-json": "^3.6.1",
344
- stylelint: "^17.10.0",
345
- "stylelint-config-nick2bad4u": "^1.0.5",
324
+ stylelint: "^17.11.0",
325
+ "stylelint-config-nick2bad4u": "^1.0.10",
346
326
  "ts-unused-exports": "^11.0.1",
347
327
  typedoc: "^0.28.19",
348
328
  typescript: "^6.0.3",
349
- "typescript-eslint": "^8.59.1",
329
+ "typescript-eslint": "^8.59.2",
350
330
  typesync: "^0.14.3",
351
331
  vfile: "^6.0.3",
352
- vite: "^8.0.10",
332
+ vite: "^8.0.11",
353
333
  "vite-tsconfig-paths": "^6.1.1",
354
334
  vitest: "^4.1.5",
355
335
  "yamllint-js": "^0.2.4"
@@ -358,7 +338,7 @@ var package_default = {
358
338
  eslint: "^9.0.0 || ^10.3.0",
359
339
  typescript: ">=5.0.0"
360
340
  },
361
- packageManager: "npm@11.13.0",
341
+ packageManager: "npm@11.14.1",
362
342
  engines: {
363
343
  node: ">=20.19.0"
364
344
  },
@@ -5497,8 +5477,12 @@ var typeScriptEslintPlugin = import_eslint_plugin.default;
5497
5477
  var nodeEslintPlugin = import_eslint_plugin_n.default;
5498
5478
  var securityEslintPlugin = import_eslint_plugin_security.default;
5499
5479
  var typeScriptFiles = ["**/*.{ts,tsx,mts,cts}"];
5480
+ var createNamedConfig = (name, config = {}) => ({
5481
+ ...config,
5482
+ name
5483
+ });
5500
5484
  var createAngularConfig = (plugin) => [
5501
- {
5485
+ createNamedConfig("SDL Angular Security", {
5502
5486
  plugins: {
5503
5487
  sdl: plugin
5504
5488
  },
@@ -5508,10 +5492,10 @@ var createAngularConfig = (plugin) => [
5508
5492
  "sdl/no-angular-innerhtml-binding": "error",
5509
5493
  "sdl/no-angular-sanitization-trusted-urls": "error"
5510
5494
  }
5511
- }
5495
+ })
5512
5496
  ];
5513
5497
  var createAngularJsConfig = (plugin) => [
5514
- {
5498
+ createNamedConfig("SDL AngularJS Security", {
5515
5499
  plugins: {
5516
5500
  sdl: plugin
5517
5501
  },
@@ -5522,10 +5506,10 @@ var createAngularJsConfig = (plugin) => [
5522
5506
  "sdl/no-angularjs-sanitization-whitelist": "error",
5523
5507
  "sdl/no-angularjs-sce-resource-url-wildcard": "error"
5524
5508
  }
5525
- }
5509
+ })
5526
5510
  ];
5527
5511
  var createCommonConfig = (plugin) => [
5528
- {
5512
+ createNamedConfig("SDL Common Web Security", {
5529
5513
  plugins: {
5530
5514
  sdl: plugin
5531
5515
  },
@@ -5563,10 +5547,10 @@ var createCommonConfig = (plugin) => [
5563
5547
  "sdl/no-worker-blob-url": "error",
5564
5548
  "sdl/no-worker-data-url": "error"
5565
5549
  }
5566
- }
5550
+ })
5567
5551
  ];
5568
5552
  var createElectronConfig = (plugin) => [
5569
- {
5553
+ createNamedConfig("SDL Electron Security", {
5570
5554
  plugins: {
5571
5555
  sdl: plugin
5572
5556
  },
@@ -5592,18 +5576,18 @@ var createElectronConfig = (plugin) => [
5592
5576
  "sdl/no-electron-webview-insecure-webpreferences": "error",
5593
5577
  "sdl/no-electron-webview-node-integration": "error"
5594
5578
  }
5595
- }
5579
+ })
5596
5580
  ];
5597
5581
  var createNodeConfig = (plugin) => [
5598
- {
5582
+ createNamedConfig("SDL Node.js Runtime Safety", {
5599
5583
  plugins: {
5600
5584
  n: nodeEslintPlugin
5601
5585
  },
5602
5586
  rules: {
5603
5587
  "n/no-deprecated-api": "error"
5604
5588
  }
5605
- },
5606
- {
5589
+ }),
5590
+ createNamedConfig("SDL Node.js Security", {
5607
5591
  plugins: {
5608
5592
  sdl: plugin
5609
5593
  },
@@ -5621,10 +5605,10 @@ var createNodeConfig = (plugin) => [
5621
5605
  "sdl/no-node-worker-threads-eval": "error",
5622
5606
  "sdl/no-unsafe-alloc": "error"
5623
5607
  }
5624
- }
5608
+ })
5625
5609
  ];
5626
5610
  var createReactConfig = (plugin) => [
5627
- {
5611
+ createNamedConfig("SDL React JSX Support", {
5628
5612
  languageOptions: {
5629
5613
  parserOptions: {
5630
5614
  ecmaFeatures: {
@@ -5632,23 +5616,23 @@ var createReactConfig = (plugin) => [
5632
5616
  }
5633
5617
  }
5634
5618
  }
5635
- },
5636
- {
5619
+ }),
5620
+ createNamedConfig("SDL React Security", {
5637
5621
  plugins: {
5638
5622
  sdl: plugin
5639
5623
  }
5640
- }
5624
+ })
5641
5625
  ];
5642
5626
  var createTypeScriptConfig = (plugin) => [
5643
- {
5627
+ createNamedConfig("SDL TypeScript Parser Support", {
5644
5628
  languageOptions: {
5645
5629
  parserOptions: {
5646
5630
  ecmaVersion: "latest",
5647
5631
  sourceType: "module"
5648
5632
  }
5649
5633
  }
5650
- },
5651
- {
5634
+ }),
5635
+ createNamedConfig("SDL TypeScript Security", {
5652
5636
  files: [...typeScriptFiles],
5653
5637
  languageOptions: {
5654
5638
  parser: import_parser.default,
@@ -5671,9 +5655,10 @@ var createTypeScriptConfig = (plugin) => [
5671
5655
  "sdl/no-trusted-types-policy-pass-through": "error",
5672
5656
  "sdl/no-unsafe-cast-to-trusted-types": "error"
5673
5657
  }
5674
- }
5658
+ })
5675
5659
  ];
5676
5660
  var createRequiredConfig = (configs2) => [
5661
+ createNamedConfig("SDL Required Security Baseline"),
5677
5662
  ...configs2.angular,
5678
5663
  ...configs2.angularjs,
5679
5664
  ...configs2.common,
@@ -5682,13 +5667,14 @@ var createRequiredConfig = (configs2) => [
5682
5667
  ...configs2.react
5683
5668
  ];
5684
5669
  var createRecommendedConfig = (configs2) => [
5670
+ createNamedConfig("SDL Recommended Security Baseline"),
5685
5671
  ...configs2.required,
5686
5672
  ...configs2.typescript,
5687
- {
5673
+ createNamedConfig("SDL Recommended Security Plugins", {
5688
5674
  plugins: {
5689
5675
  security: securityEslintPlugin
5690
5676
  }
5691
- }
5677
+ })
5692
5678
  ];
5693
5679
  var packageJsonVersion = typeof package_default.version === "string" && package_default.version.length > 0 ? package_default.version : "0.0.0";
5694
5680
  var pluginCore = {