Skip to content

Commit 25c69ab

Browse files
authored
chore: update recommended config
BREAKING CHANGE: new rules added to recommended config closes #429
1 parent ce4260d commit 25c69ab

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,28 +111,28 @@ installations requiring long-term consistency.
111111
| Rule | Description | Configurations | Fixable |
112112
| ------------------------------ | ----------------------------------------------------------------- | ---------------- | ------------------- |
113113
| [consistent-test-it][] | Enforce consistent test or it keyword | | ![fixable-green][] |
114-
| [expect-expect][] | Enforce assertion to be made in a test body | | |
114+
| [expect-expect][] | Enforce assertion to be made in a test body | ![recommended][] | |
115115
| [lowercase-name][] | Disallow capitalized test names | | ![fixable-green][] |
116-
| [no-alias-methods][] | Disallow alias methods | ![recommended][] | ![fixable-green][] |
117-
| [no-commented-out-tests][] | Disallow commented out tests | | |
116+
| [no-alias-methods][] | Disallow alias methods | ![style][] | ![fixable-green][] |
117+
| [no-commented-out-tests][] | Disallow commented out tests | ![recommended][] | |
118118
| [no-disabled-tests][] | Disallow disabled tests | ![recommended][] | |
119119
| [no-duplicate-hooks][] | Disallow duplicate hooks within a `describe` block | | |
120120
| [no-expect-resolves][] | Disallow using `expect().resolves` | | |
121-
| [no-export][] | Disallow export from test files | | |
121+
| [no-export][] | Disallow export from test files | ![recommended][] | |
122122
| [no-focused-tests][] | Disallow focused tests | ![recommended][] | |
123123
| [no-hooks][] | Disallow setup and teardown hooks | | |
124124
| [no-identical-title][] | Disallow identical titles | ![recommended][] | |
125125
| [no-if][] | Disallow conditional logic | | |
126126
| [no-jasmine-globals][] | Disallow Jasmine globals | ![recommended][] | ![fixable-yellow][] |
127127
| [no-jest-import][] | Disallow importing `jest` | ![recommended][] | |
128128
| [no-large-snapshots][] | Disallow large snapshots | | |
129-
| [no-mocks-import][] | Disallow manually importing from `__mocks__` | | |
129+
| [no-mocks-import][] | Disallow manually importing from `__mocks__` | ![recommended][] | |
130130
| [no-standalone-expect][] | Prevents `expect` statements outside of a `test` or `it` block | | |
131131
| [no-test-callback][] | Using a callback in asynchronous tests | | ![fixable-green][] |
132132
| [no-test-prefixes][] | Disallow using `f` & `x` prefixes to define focused/skipped tests | ![recommended][] | ![fixable-green][] |
133133
| [no-test-return-statement][] | Disallow explicitly returning from tests | | |
134134
| [no-truthy-falsy][] | Disallow using `toBeTruthy()` & `toBeFalsy()` | | |
135-
| [no-try-expect][] | Prevent `catch` assertions in tests | | |
135+
| [no-try-expect][] | Prevent `catch` assertions in tests | ![recommended][] | |
136136
| [prefer-called-with][] | Suggest using `toBeCalledWith()` OR `toHaveBeenCalledWith()` | | |
137137
| [prefer-expect-assertions][] | Suggest using `expect.assertions()` OR `expect.hasAssertions()` | | |
138138
| [prefer-hooks-on-top][] | Suggest to have all hooks at top-level before tests | | |

src/index.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,18 @@ export = {
4444
'jest/globals': true,
4545
},
4646
rules: {
47-
'jest/no-alias-methods': 'warn',
47+
'jest/expect-expect': 'warn',
48+
'jest/no-commented-out-tests': 'warn',
4849
'jest/no-disabled-tests': 'warn',
50+
'jest/no-export': 'error',
4951
'jest/no-focused-tests': 'error',
5052
'jest/no-identical-title': 'error',
5153
'jest/no-jest-import': 'error',
52-
// 'jest/no-mocks-import': 'error',
54+
'jest/no-mocks-import': 'error',
5355
'jest/no-jasmine-globals': 'warn',
56+
'jest/no-test-callback': 'error',
5457
'jest/no-test-prefixes': 'error',
58+
'jest/no-try-expect': 'error',
5559
'jest/valid-describe': 'error',
5660
'jest/valid-expect': 'error',
5761
'jest/valid-expect-in-promise': 'error',
@@ -60,6 +64,7 @@ export = {
6064
style: {
6165
plugins: ['jest'],
6266
rules: {
67+
'jest/no-alias-methods': 'warn',
6368
'jest/prefer-to-be-null': 'error',
6469
'jest/prefer-to-be-undefined': 'error',
6570
'jest/prefer-to-contain': 'error',

0 commit comments

Comments
 (0)