From 99ee308f3d9fa8d29444a9bb783f604f70424c52 Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Sat, 20 Jan 2024 21:42:37 +0100 Subject: [PATCH] Avoid to have focused tests in using eslint-plugin-jasmine --- package-lock.json | 17 +++++++++++------ package.json | 1 + test/.eslintrc | 18 +++++++++++++----- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index f0efdeed8..6bb9872bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,6 +27,7 @@ "eslint-plugin-fetch-options": "^0.0.5", "eslint-plugin-html": "^7.1.0", "eslint-plugin-import": "^2.29.1", + "eslint-plugin-jasmine": "^4.1.3", "eslint-plugin-json": "^3.1.0", "eslint-plugin-mozilla": "^3.3.2", "eslint-plugin-no-unsanitized": "^4.0.2", @@ -6077,6 +6078,16 @@ "semver": "bin/semver.js" } }, + "node_modules/eslint-plugin-jasmine": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-jasmine/-/eslint-plugin-jasmine-4.1.3.tgz", + "integrity": "sha512-q8j8KnLH/4uwmPELFZvEyfEcuCuGxXScJaRdqHjOjz064GcfX6aoFbzy5VohZ5QYk2+WvoqMoqDSb9nRLf89GQ==", + "dev": true, + "engines": { + "node": ">=8", + "npm": ">=6" + } + }, "node_modules/eslint-plugin-json": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-json/-/eslint-plugin-json-3.1.0.tgz", @@ -13336,7 +13347,6 @@ }, "node_modules/npm/node_modules/lodash._baseindexof": { "version": "3.1.0", - "extraneous": true, "inBundle": true, "license": "MIT" }, @@ -13352,19 +13362,16 @@ }, "node_modules/npm/node_modules/lodash._bindcallback": { "version": "3.0.1", - "extraneous": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/lodash._cacheindexof": { "version": "3.0.2", - "extraneous": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/lodash._createcache": { "version": "3.1.2", - "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -13379,7 +13386,6 @@ }, "node_modules/npm/node_modules/lodash._getnative": { "version": "3.9.1", - "extraneous": true, "inBundle": true, "license": "MIT" }, @@ -13397,7 +13403,6 @@ }, "node_modules/npm/node_modules/lodash.restparam": { "version": "3.6.1", - "extraneous": true, "inBundle": true, "license": "MIT" }, diff --git a/package.json b/package.json index 2e3c1c9f8..e0915c814 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "eslint-plugin-fetch-options": "^0.0.5", "eslint-plugin-html": "^7.1.0", "eslint-plugin-import": "^2.29.1", + "eslint-plugin-jasmine": "^4.1.3", "eslint-plugin-json": "^3.1.0", "eslint-plugin-mozilla": "^3.3.2", "eslint-plugin-no-unsanitized": "^4.0.2", diff --git a/test/.eslintrc b/test/.eslintrc index ab42529e7..77388ebfc 100644 --- a/test/.eslintrc +++ b/test/.eslintrc @@ -1,10 +1,18 @@ { - "extends": [ - "../.eslintrc" - ], - + "plugins": ["jasmine"], + "extends": ["../.eslintrc", "plugin:jasmine/recommended"], "env": { "node": true, - "jasmine": true, + "jasmine": true }, + "rules": { + "jasmine/new-line-before-expect": "off", + "jasmine/new-line-between-declarations": "off", + "jasmine/no-focused-tests": "error", + "jasmine/no-pending-tests": "off", + "jasmine/no-spec-dupes": "off", + "jasmine/no-suite-dupes": "off", + "jasmine/prefer-jasmine-matcher": "off", + "jasmine/prefer-toHaveBeenCalledWith": "off" + } }