From 5bca4e1c43985fc01c820471585408e41fc74e1f Mon Sep 17 00:00:00 2001 From: capitnflam Date: Sat, 16 Mar 2024 01:35:29 +0100 Subject: [PATCH] feat: add eslint-plugin-sonarjs (#15) --- package-lock.json | 12 ++++++++++++ package.json | 1 + src/configs/recommended.ts | 1 + 3 files changed, 14 insertions(+) diff --git a/package-lock.json b/package-lock.json index d6ecc20..82a56a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ "eslint-plugin-no-unsanitized": "4.0.2", "eslint-plugin-react": "7.34.1", "eslint-plugin-react-hooks": "4.6.0", + "eslint-plugin-sonarjs": "0.24.0", "eslint-plugin-unicorn": "51.0.1", "eslint-plugin-xss": "0.1.12" }, @@ -3375,6 +3376,17 @@ "semver": "bin/semver.js" } }, + "node_modules/eslint-plugin-sonarjs": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-0.24.0.tgz", + "integrity": "sha512-87zp50mbbNrSTuoEOebdRQBPa0mdejA5UEjyuScyIw8hEpEjfWP89Qhkq5xVZfVyVSRQKZc9alVm7yRKQvvUmg==", + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/eslint-plugin-unicorn": { "version": "51.0.1", "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-51.0.1.tgz", diff --git a/package.json b/package.json index f3d0195..80b7f09 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "eslint-plugin-no-unsanitized": "4.0.2", "eslint-plugin-react": "7.34.1", "eslint-plugin-react-hooks": "4.6.0", + "eslint-plugin-sonarjs": "0.24.0", "eslint-plugin-unicorn": "51.0.1", "eslint-plugin-xss": "0.1.12" }, diff --git a/src/configs/recommended.ts b/src/configs/recommended.ts index 1d8e709..9181463 100644 --- a/src/configs/recommended.ts +++ b/src/configs/recommended.ts @@ -9,6 +9,7 @@ export const recommended: ESLintConfig = { 'plugin:import/recommended', 'plugin:import/typescript', 'plugin:unicorn/recommended', + 'plugin:sonarjs/recommended', 'prettier', ], parser: '@typescript-eslint/parser',