diff --git a/eslint.config.js b/eslint.config.js index cf8b066..4ac19ee 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,6 +1,7 @@ import js from '@eslint/js'; import tsPlugin from '@typescript-eslint/eslint-plugin'; import tsParser from '@typescript-eslint/parser'; +import securityPlugin from 'eslint-plugin-security'; import sveltePlugin from 'eslint-plugin-svelte'; import svelteParser from 'svelte-eslint-parser'; @@ -67,10 +68,12 @@ export default [ }, plugins: { '@typescript-eslint': tsPlugin, + security: securityPlugin, svelte: sveltePlugin, }, rules: { ...tsPlugin.configs.recommended.rules, + ...securityPlugin.configs.recommended.rules, }, }, { diff --git a/package.json b/package.json index 57f5ed5..b6dfd59 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ "@typescript-eslint/eslint-plugin": "^8.51.0", "@typescript-eslint/parser": "^8.51.0", "eslint": "^9.39.2", + "eslint-plugin-security": "^3.0.1", "eslint-plugin-svelte": "^3.13.1", "prettier": "^3.7.4", "prettier-plugin-svelte": "^3.4.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1c222f9..7cb9972 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,6 +45,9 @@ importers: eslint: specifier: ^9.39.2 version: 9.39.2(jiti@1.21.7) + eslint-plugin-security: + specifier: ^3.0.1 + version: 3.0.1 eslint-plugin-svelte: specifier: ^3.13.1 version: 3.13.1(eslint@9.39.2(jiti@1.21.7))(svelte@5.46.1) @@ -702,6 +705,10 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} + eslint-plugin-security@3.0.1: + resolution: {integrity: sha512-XjVGBhtDZJfyuhIxnQ/WMm385RbX3DBu7H1J7HNNhmB2tnGxMeqVSnYv79oAj992ayvIBZghsymwkYFS6cGH4Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-plugin-svelte@3.13.1: resolution: {integrity: sha512-Ng+kV/qGS8P/isbNYVE3sJORtubB+yLEcYICMkUWNaDTb0SwZni/JhAYXh/Dz/q2eThUwWY0VMPZ//KYD1n3eQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1147,6 +1154,10 @@ packages: resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} engines: {node: '>= 14.18.0'} + regexp-tree@0.1.27: + resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} + hasBin: true + resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -1172,6 +1183,9 @@ packages: resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} engines: {node: '>=6'} + safe-regex@2.1.1: + resolution: {integrity: sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==} + semver@7.7.3: resolution: {integrity: sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==} engines: {node: '>=10'} @@ -1907,6 +1921,10 @@ snapshots: escape-string-regexp@4.0.0: {} + eslint-plugin-security@3.0.1: + dependencies: + safe-regex: 2.1.1 + eslint-plugin-svelte@3.13.1(eslint@9.39.2(jiti@1.21.7))(svelte@5.46.1): dependencies: '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.2(jiti@1.21.7)) @@ -2302,6 +2320,8 @@ snapshots: readdirp@4.1.2: {} + regexp-tree@0.1.27: {} + resolve-from@4.0.0: {} resolve@1.22.11: @@ -2348,6 +2368,10 @@ snapshots: dependencies: mri: 1.2.0 + safe-regex@2.1.1: + dependencies: + regexp-tree: 0.1.27 + semver@7.7.3: {} set-cookie-parser@2.7.2: {}