Skip to content

Commit 37d5a03

Browse files
committed
chore: add lint rule to avoid focused or disabled tests
1 parent 5bd4f6a commit 37d5a03

File tree

3 files changed

+109
-5
lines changed

3 files changed

+109
-5
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',
@@ -29,7 +30,9 @@ module.exports = {
2930
files: ['**/__tests__/**', 'test-dts/**'],
3031
rules: {
3132
'no-restricted-globals': 'off',
32-
'no-restricted-syntax': 'off'
33+
'no-restricted-syntax': 'off',
34+
'jest/no-disabled-tests': 'error',
35+
'jest/no-focused-tests': 'error'
3336
}
3437
},
3538
// 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.4",
7273
"execa": "^4.0.2",
7374
"fs-extra": "^9.0.1",
7475
"jest": "^27.1.0",

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)