diff --git a/.eslintrc.js b/.eslintrc.js index b4715585d0..3190602dfe 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -36,6 +36,12 @@ module.exports = { } } ], + "jest/max-nested-describe": [ + "error", + { + "max": 3 + } + ] } }, { diff --git a/package-lock.json b/package-lock.json index 25f8b22d7a..1c93f132cf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -79,6 +79,7 @@ "eslint": "^8.53.0", "eslint-plugin-import": "^2.29.0", "eslint-plugin-jasmine": "^4.1.3", + "eslint-plugin-jest": "^28.8.3", "eslint-plugin-jsdoc": "^46.9.0", "eslint-plugin-modules-newlines": "^0.0.7", "eslint-plugin-prefer-arrow": "^1.2.3", @@ -15717,6 +15718,32 @@ "npm": ">=6" } }, + "node_modules/eslint-plugin-jest": { + "version": "28.8.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-28.8.3.tgz", + "integrity": "sha512-HIQ3t9hASLKm2IhIOqnu+ifw7uLZkIlR7RYNv7fMcEi/p0CIiJmfriStQS2LDkgtY4nyLbIZAD+JL347Yc2ETQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/utils": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "engines": { + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^6.0.0 || ^7.0.0 || ^8.0.0", + "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0", + "jest": "*" + }, + "peerDependenciesMeta": { + "@typescript-eslint/eslint-plugin": { + "optional": true + }, + "jest": { + "optional": true + } + } + }, "node_modules/eslint-plugin-jsdoc": { "version": "46.10.1", "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.10.1.tgz", diff --git a/package.json b/package.json index 6028e50563..5d2f0603a9 100644 --- a/package.json +++ b/package.json @@ -80,6 +80,7 @@ "eslint": "^8.53.0", "eslint-plugin-import": "^2.29.0", "eslint-plugin-jasmine": "^4.1.3", + "eslint-plugin-jest": "^28.8.3", "eslint-plugin-jsdoc": "^46.9.0", "eslint-plugin-modules-newlines": "^0.0.7", "eslint-plugin-prefer-arrow": "^1.2.3", diff --git a/tools/eslint/config/index.js b/tools/eslint/config/index.js index 1aae058e07..58c41f2aec 100644 --- a/tools/eslint/config/index.js +++ b/tools/eslint/config/index.js @@ -2,6 +2,7 @@ module.exports = { plugins: [ 'modules-newlines', 'jasmine', + 'jest', "eslint-plugin-import", "eslint-plugin-jsdoc", "eslint-plugin-prefer-arrow"