Skip to content

Commit 440c441

Browse files
committed
feat: error on banned functions
There were multiple cases recently of stray test.only() committed to master. This prevents those cases.
1 parent 8e9b255 commit 440c441

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.eslintrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = {
2626
'arrow-body-style': 'error',
2727
'arrow-parens': ['error', 'as-needed'],
2828
'ban/ban': [
29-
'warn',
29+
'error',
3030
{
3131
name: ['*', 'forEach'],
3232
message: 'Use a for-of loop instead',
@@ -41,7 +41,7 @@ module.exports = {
4141
},
4242
{
4343
name: ['jest', 'fn'],
44-
message: 'Use sinon.spy(() => {}) instead',
44+
message: 'Use sinon.spy(() => undefined) instead',
4545
},
4646
],
4747
'callback-return': 'error',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"@typescript-eslint/eslint-plugin": "^2.14.0",
3939
"@typescript-eslint/parser": "^2.14.0",
4040
"eslint-config-prettier": "^6.9.0",
41-
"eslint-plugin-ban": "^1.3.0",
41+
"eslint-plugin-ban": "^1.4.0",
4242
"eslint-plugin-etc": "^0.0.1-beta.24",
4343
"eslint-plugin-import": "^2.19.1",
4444
"eslint-plugin-jsdoc": "^19.2.0",

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,10 +1497,10 @@ eslint-module-utils@^2.4.1:
14971497
debug "^2.6.9"
14981498
pkg-dir "^2.0.0"
14991499

1500-
eslint-plugin-ban@^1.3.0:
1501-
version "1.3.0"
1502-
resolved "https://registry.yarnpkg.com/eslint-plugin-ban/-/eslint-plugin-ban-1.3.0.tgz#be9714cb9e01a1adec6c86cdb182e97636eafe44"
1503-
integrity sha512-A9A2z60UeVj7/BdKzeIjVEGAog/4QXAyOkZ98AUnZc7fsRp+J7YW7+U/YEVpBJqjSiU/FGUA5tGJoI34ul/TyA==
1500+
eslint-plugin-ban@^1.4.0:
1501+
version "1.4.0"
1502+
resolved "https://registry.npmjs.org/eslint-plugin-ban/-/eslint-plugin-ban-1.4.0.tgz#b3a7b000412921336b1feeece5b8ce9a69dea605"
1503+
integrity sha512-wtrUOLg8WUiGDkVnmyMseLRtXYBM+bJTe2STvhqznHVj6RPAiNEVLbvDj2b0WWwY/2ldKqeaw3iHUHwfCJ8c8Q==
15041504
dependencies:
15051505
requireindex "~1.2.0"
15061506

0 commit comments

Comments
 (0)