Add eslint ban rule (#2517)

This commit is contained in:
Pablo Martinez Garcia
2022-05-05 14:06:36 +02:00
committed by GitHub
parent 9a2bca0611
commit 1b61687a1d
3 changed files with 22 additions and 1 deletions

View File

@@ -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",