Skip to content

Commit 5d3ebcc

Browse files
committed
feat: update list of recommended rules
BREAKING CHANGE: New rules added to the recommended config
1 parent 37f4396 commit 5d3ebcc

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,28 +83,28 @@ for more information about extending configuration files.
8383
| [consistent-test-it][] | Enforce consistent test or it keyword | | ![fixable-green][] |
8484
| [expect-expect][] | Enforce assertion to be made in a test body | | |
8585
| [lowercase-name][] | Disallow capitalized test names | | ![fixable-green][] |
86-
| [no-alias-methods][] | Disallow alias methods | | ![fixable-green][] |
86+
| [no-alias-methods][] | Disallow alias methods | ![recommended][] | ![fixable-green][] |
8787
| [no-disabled-tests][] | Disallow disabled tests | ![recommended][] | |
8888
| [no-focused-tests][] | Disallow focused tests | ![recommended][] | |
8989
| [no-hooks][] | Disallow setup and teardown hooks | | |
9090
| [no-identical-title][] | Disallow identical titles | ![recommended][] | |
91-
| [no-jasmine-globals][] | Disallow Jasmine globals | | ![fixable-yellow][] |
91+
| [no-jasmine-globals][] | Disallow Jasmine globals | ![recommended][] | ![fixable-yellow][] |
9292
| [no-jest-import][] | Disallow importing `jest` | ![recommended][] | |
9393
| [no-large-snapshots][] | Disallow large snapshots | | |
9494
| [no-test-callback][] | Using a callback in asynchronous tests | | ![fixable-green][] |
95-
| [no-test-prefixes][] | Disallow using `f` & `x` prefixes to define focused/skipped tests | | ![fixable-green][] |
95+
| [no-test-prefixes][] | Disallow using `f` & `x` prefixes to define focused/skipped tests | ![recommended][] | ![fixable-green][] |
9696
| [no-test-return-statement][] | Disallow explicitly returning from tests | | |
9797
| [prefer-expect-assertions][] | Suggest using `expect.assertions()` OR `expect.hasAssertions()` | | |
9898
| [prefer-spy-on][] | Suggest using `jest.spyOn()` | | ![fixable-green][] |
9999
| [prefer-strict-equal][] | Suggest using `toStrictEqual()` | | ![fixable-green][] |
100100
| [prefer-to-be-null][] | Suggest using `toBeNull()` | | ![fixable-green][] |
101101
| [prefer-to-be-undefined][] | Suggest using `toBeUndefined()` | | ![fixable-green][] |
102102
| [prefer-to-contain][] | Suggest using `toContain()` | | ![fixable-green][] |
103-
| [prefer-to-have-length][] | Suggest using `toHaveLength()` | ![recommended][] | ![fixable-green][] |
103+
| [prefer-to-have-length][] | Suggest using `toHaveLength()` | | ![fixable-green][] |
104104
| [prefer-inline-snapshots][] | Suggest using `toMatchInlineSnapshot()` | | ![fixable-green][] |
105105
| [require-tothrow-message][] | Require that `toThrow()` and `toThrowError` includes a message | | |
106-
| [valid-describe][] | Enforce valid `describe()` callback | | |
107-
| [valid-expect-in-promise][] | Enforce having return statement when testing with promises | | |
106+
| [valid-describe][] | Enforce valid `describe()` callback | ![recommended][] | |
107+
| [valid-expect-in-promise][] | Enforce having return statement when testing with promises | ![recommended][] | |
108108
| [valid-expect][] | Enforce valid `expect()` usage | ![recommended][] | |
109109

110110
## Credit

index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,16 @@ module.exports = {
3737
'jest/globals': true,
3838
},
3939
rules: {
40+
'jest/no-alias-methods': 'warn',
4041
'jest/no-disabled-tests': 'warn',
4142
'jest/no-focused-tests': 'error',
4243
'jest/no-identical-title': 'error',
43-
'jest/no-jest-import': 'warn',
44-
'jest/prefer-to-have-length': 'warn',
44+
'jest/no-jest-import': 'error',
45+
'jest/no-jasmine-globals': 'warn',
46+
'jest/no-test-prefixes': 'error',
47+
'jest/valid-describe': 'error',
4548
'jest/valid-expect': 'error',
49+
'jest/valid-expect-in-promise': 'error',
4650
},
4751
},
4852
},

0 commit comments

Comments
 (0)