From 16193033b0661217953cea463183af70089624a1 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Mon, 11 Nov 2024 16:44:43 +0100 Subject: [PATCH] install lint security --- .eslintrc.js | 4 ++-- package-lock.json | 37 +++++++++++++++++++++++++++++++++++++ package.json | 1 + 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 3836ab1a..09e0cdc9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -12,7 +12,7 @@ module.exports = { 'plugin:import/recommended', 'plugin:import/typescript', // 'plugin:promise/recommended', - // 'plugin:security/recommended-legacy', + 'plugin:security/recommended-legacy', 'plugin:react/recommended', ], parserOptions: { @@ -24,7 +24,7 @@ module.exports = { '@typescript-eslint', 'import', // 'promise', - // 'security', + 'security', // 'no-catch-all', 'react', 'react-hooks', diff --git a/package-lock.json b/package-lock.json index 74187848..76dff00d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,6 +48,7 @@ "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-react": "^7.31.8", "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-security": "^3.0.1", "eslint-plugin-yml": "^1.14.0", "postcss": "^8.4.21", "prettier": "^3.3.3", @@ -2488,6 +2489,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/eslint-plugin-security": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-3.0.1.tgz", + "integrity": "sha512-XjVGBhtDZJfyuhIxnQ/WMm385RbX3DBu7H1J7HNNhmB2tnGxMeqVSnYv79oAj992ayvIBZghsymwkYFS6cGH4Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "safe-regex": "^2.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint-plugin-yml": { "version": "1.14.0", "resolved": "https://registry.npmjs.org/eslint-plugin-yml/-/eslint-plugin-yml-1.14.0.tgz", @@ -6092,6 +6109,16 @@ "node": ">=8.10.0" } }, + "node_modules/regexp-tree": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", + "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", + "dev": true, + "license": "MIT", + "bin": { + "regexp-tree": "bin/regexp-tree" + } + }, "node_modules/regexp.prototype.flags": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.3.tgz", @@ -6405,6 +6432,16 @@ "integrity": "sha512-6pNbSMW6OhAi9j+N8V+U715yBQsaWJ7eyEUaOrawX+isg5ZxhUlV1NipNtgaKHmFGiABwt+ZF04Ii+3Xjkg+8w==", "dev": true }, + "node_modules/safe-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz", + "integrity": "sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==", + "dev": true, + "license": "MIT", + "dependencies": { + "regexp-tree": "~0.1.1" + } + }, "node_modules/safe-regex-test": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", diff --git a/package.json b/package.json index 825bc7b7..2bdb2d60 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-react": "^7.31.8", "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-security": "^3.0.1", "eslint-plugin-yml": "^1.14.0", "postcss": "^8.4.21", "prettier": "^3.3.3",