diff --git a/.eslintrc.json b/.eslintrc.json index 6cabb5fd3..1e9ba7acf 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -19,9 +19,20 @@ "plugins": [ "eslint-plugin-rxjs", "eslint-plugin-unicorn", - "prettier" + "prettier", + "ban" ], "rules": { + "ban/ban": [ + "error", + { "name": "eval", "message": "Calls to eval is not allowed." }, + { "name": "fdescribe", "message": "Calls to fdescribe is not allowed" }, + { "name": "fit", "message": "Calls to fit is not allowed" }, + { "name": "xit", "message": "Calls to xit is not allowed" }, + { "name": "xdescribe", "message": "Calls to xdescribe is not allowed" }, + { "name": ["test", "only"], "message": "Calls to test.only is not allowed" }, + { "name": ["describe", "only"], "message": "Calls to describe.only is not allowed" } + ], "prettier/prettier": "error", "no-shadow": "off", "@typescript-eslint/no-shadow": "error", diff --git a/package-lock.json b/package-lock.json index 88b665fa8..08956595f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8105,6 +8105,15 @@ } } }, + "eslint-plugin-ban": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-ban/-/eslint-plugin-ban-1.6.0.tgz", + "integrity": "sha512-gZptoV+SFHOHO57/5lmPvizMvSXrjFatP9qlVQf3meL/WHo9TxSoERygrMlESl19CPh95U86asTxohT8OprwDw==", + "dev": true, + "requires": { + "requireindex": "~1.2.0" + } + }, "eslint-plugin-import": { "version": "2.25.4", "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz", diff --git a/package.json b/package.json index 6e899e794..05024e593 100644 --- a/package.json +++ b/package.json @@ -87,6 +87,7 @@ "dotenv-expand": "^5.1.0", "envsub": "^4.0.7", "eslint": "^7.6.0", + "eslint-plugin-ban": "^1.6.0", "eslint-plugin-import": "^2.25.4", "eslint-plugin-jsdoc": "30.7.6", "eslint-plugin-prefer-arrow": "1.2.3",