Skip to content

Commit b8e0b24

Browse files
committed
chore: add lint rule to avoid focused or disabled tests
1 parent b5d5a17 commit b8e0b24

File tree

3 files changed

+104
-3
lines changed

3 files changed

+104
-3
lines changed

.eslintrc.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ module.exports = {
66
parserOptions: {
77
sourceType: 'module'
88
},
9+
plugins: ["jest"],
910
rules: {
1011
'no-unused-vars': [
1112
'error',
@@ -31,7 +32,9 @@ module.exports = {
3132
files: ['**/__tests__/**', 'test-dts/**'],
3233
rules: {
3334
'no-restricted-globals': 'off',
34-
'no-restricted-syntax': 'off'
35+
'no-restricted-syntax': 'off',
36+
'jest/no-disabled-tests': 'error',
37+
'jest/no-focused-tests': 'error'
3538
}
3639
},
3740
// shared, may be used in any env

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
"enquirer": "^2.3.2",
7070
"esbuild": "^0.14.35",
7171
"eslint": "^7.7.0",
72+
"eslint-plugin-jest": "26.1.5",
7273
"execa": "^4.0.2",
7374
"fs-extra": "^9.0.1",
7475
"jest": "^27.1.0",

pnpm-lock.yaml

Lines changed: 99 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)