diff --git a/.eslintrc.yml b/.eslintrc.yml index 58f2184..4ebd163 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -3,3 +3,9 @@ root: true extends: - typescript - prettier + - plugin:optimize-regex/recommended + - plugin:sonarjs/recommended + +plugins: + - eslint-plugin-optimize-regex + - sonarjs diff --git a/package-lock.json b/package-lock.json index d1eae80..6058132 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,6 +21,8 @@ "eslint": "^8.20.0", "eslint-config-prettier": "^8.5.0", "eslint-config-typescript": "^3.0.0", + "eslint-plugin-optimize-regex": "^1.2.1", + "eslint-plugin-sonarjs": "^0.14.0", "prettier": "^2.7.1", "service-worker-mock": "^2.0.5", "ts-loader": "^9.3.1", @@ -1809,6 +1811,30 @@ "typescript": "*" } }, + "node_modules/eslint-plugin-optimize-regex": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-optimize-regex/-/eslint-plugin-optimize-regex-1.2.1.tgz", + "integrity": "sha512-fUaU7Tj1G/KSTDTABJw4Wp427Rl7RPl9ViYTu1Jrv36fJw4DFhd4elPdXiuYtdPsNsvzn9GcVlKEssGIVjw0UQ==", + "dev": true, + "dependencies": { + "regexp-tree": "^0.1.21" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-plugin-sonarjs": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-0.14.0.tgz", + "integrity": "sha512-0X0q3fB8ghppms19cR2oIK2ajoFp7DEy3AVGDqO7WX02r1aWOzkrHa+veatGZw+R7amgBvfcF0qHCG66p9Zoag==", + "dev": true, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -3027,6 +3053,15 @@ "node": ">= 0.10" } }, + "node_modules/regexp-tree": { + "version": "0.1.24", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.24.tgz", + "integrity": "sha512-s2aEVuLhvnVJW6s/iPgEGK6R+/xngd2jNQ+xy4bXNDKxZKJH6jpPHY6kVeVv1IeLCHgswRj+Kl3ELaDjG6V1iw==", + "dev": true, + "bin": { + "regexp-tree": "bin/regexp-tree" + } + }, "node_modules/regexpp": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", @@ -5176,6 +5211,22 @@ "dev": true, "requires": {} }, + "eslint-plugin-optimize-regex": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-optimize-regex/-/eslint-plugin-optimize-regex-1.2.1.tgz", + "integrity": "sha512-fUaU7Tj1G/KSTDTABJw4Wp427Rl7RPl9ViYTu1Jrv36fJw4DFhd4elPdXiuYtdPsNsvzn9GcVlKEssGIVjw0UQ==", + "dev": true, + "requires": { + "regexp-tree": "^0.1.21" + } + }, + "eslint-plugin-sonarjs": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-0.14.0.tgz", + "integrity": "sha512-0X0q3fB8ghppms19cR2oIK2ajoFp7DEy3AVGDqO7WX02r1aWOzkrHa+veatGZw+R7amgBvfcF0qHCG66p9Zoag==", + "dev": true, + "requires": {} + }, "eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -6066,6 +6117,12 @@ "resolve": "^1.9.0" } }, + "regexp-tree": { + "version": "0.1.24", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.24.tgz", + "integrity": "sha512-s2aEVuLhvnVJW6s/iPgEGK6R+/xngd2jNQ+xy4bXNDKxZKJH6jpPHY6kVeVv1IeLCHgswRj+Kl3ELaDjG6V1iw==", + "dev": true + }, "regexpp": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", diff --git a/package.json b/package.json index 9716da9..aef7b64 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,8 @@ "eslint": "^8.20.0", "eslint-config-prettier": "^8.5.0", "eslint-config-typescript": "^3.0.0", + "eslint-plugin-optimize-regex": "^1.2.1", + "eslint-plugin-sonarjs": "^0.14.0", "prettier": "^2.7.1", "service-worker-mock": "^2.0.5", "ts-loader": "^9.3.1",