From ccd591d4efa3916137ccb56e3b8bcad5d44d0fe7 Mon Sep 17 00:00:00 2001 From: Jakob Date: Sun, 17 Jan 2021 09:45:42 -0800 Subject: [PATCH] Add eslint security plugin (#5450) Co-authored-by: Jakob Sandberg Co-authored-by: Sulka Haro --- .eslintrc.js | 7 +++++-- npm-shrinkwrap.json | 9 +++++++++ package.json | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 974a562c7c6..69cb41cb491 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,7 +1,10 @@ module.exports = { - "plugins": [ ], + "plugins": [ + "security" + ], "extends": [ - "eslint:recommended" + "eslint:recommended", + "plugin:security/recommended" ], "parser": "babel-eslint", "env": { diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 765f8d59121..ed9d903b610 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -3737,6 +3737,15 @@ "rimraf": "^2.6.1" } }, + "eslint-plugin-security": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-1.4.0.tgz", + "integrity": "sha512-xlS7P2PLMXeqfhyf3NpqbvbnW04kN8M9NtmhpR3XGyOvt/vNKS7XPXT5EDbwKW9vCjWH4PpfQvgD/+JgN0VJKA==", + "dev": true, + "requires": { + "safe-regex": "^1.1.0" + } + }, "eslint-scope": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", diff --git a/package.json b/package.json index 63f765b4e3d..8498fd3bcd3 100644 --- a/package.json +++ b/package.json @@ -140,6 +140,7 @@ "env-cmd": "^10.1.0", "eslint": "^6.8.0", "eslint-loader": "^2.2.1", + "eslint-plugin-security": "^1.4.0", "mocha": "^8.1.1", "nodemon": "^1.19.4", "nyc": "^14.1.1",