Skip to content

Commit 74cd2ae

Browse files
committed
Merge branch 'main' into next
2 parents 6aa7eea + aa249a2 commit 74cd2ae

File tree

10 files changed

+199
-1021
lines changed

10 files changed

+199
-1021
lines changed

.github/workflows/nodejs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
run: yarn test --coverage
8787
env:
8888
CI: true
89-
- uses: codecov/codecov-action@v2.0.3
89+
- uses: codecov/codecov-action@v2.1.0
9090
if: always()
9191
test-os:
9292
name: Test on ${{ matrix.os }} using Node.js LTS

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@
3434

3535
* Drop support for Node 10 and 15
3636

37+
## [24.4.2](https://github.com/jest-community/eslint-plugin-jest/compare/v24.4.1...v24.4.2) (2021-09-17)
38+
39+
40+
### Bug Fixes
41+
42+
* use correct property `hasSuggestions` rather than `hasSuggestion` ([#899](https://github.com/jest-community/eslint-plugin-jest/issues/899)) ([dfd2368](https://github.com/jest-community/eslint-plugin-jest/commit/dfd2368d1cb1789b6a95a11be24c36868bb8a819))
43+
44+
## [24.4.1](https://github.com/jest-community/eslint-plugin-jest/compare/v24.4.0...v24.4.1) (2021-09-17)
45+
46+
47+
### Bug Fixes
48+
49+
* mark rules that suggest fixes with `hasSuggestion` for ESLint v8 ([#898](https://github.com/jest-community/eslint-plugin-jest/issues/898)) ([ec0a21b](https://github.com/jest-community/eslint-plugin-jest/commit/ec0a21b0d98d043a9949138e495814e0935d5e31))
50+
3751
# [24.4.0](https://github.com/jest-community/eslint-plugin-jest/compare/v24.3.7...v24.4.0) (2021-07-21)
3852

3953

docs/rules/valid-title.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,11 @@ specific Jest test function groups (`describe`, `test`, and `it`).
204204
Examples of **incorrect** code when using `mustMatch`:
205205

206206
```js
207-
// with mustMatch: '$that'
207+
// with mustMatch: '^that'
208208
describe('the correct way to do things', () => {});
209209
fit('this there!', () => {});
210210

211-
// with mustMatch: { test: '$that' }
211+
// with mustMatch: { test: '^that' }
212212
describe('the tests that will be run', () => {});
213213
test('the stuff works', () => {});
214214
xtest('errors that are thrown have messages', () => {});
@@ -217,11 +217,11 @@ xtest('errors that are thrown have messages', () => {});
217217
Examples of **correct** code when using `mustMatch`:
218218

219219
```js
220-
// with mustMatch: '$that'
220+
// with mustMatch: '^that'
221221
describe('that thing that needs to be done', () => {});
222222
fit('that this there!', () => {});
223223

224-
// with mustMatch: { test: '$that' }
224+
// with mustMatch: { test: '^that' }
225225
describe('the tests that will be run', () => {});
226226
test('that the stuff works', () => {});
227227
xtest('that errors that thrown have messages', () => {});

src/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ type RuleModule = TSESLint.RuleModule<string, unknown[]> & {
88
meta: Required<Pick<TSESLint.RuleMetaData<string>, 'docs'>>;
99
};
1010

11-
// can be removed once we've on v3: https://github.com/typescript-eslint/typescript-eslint/issues/2060
11+
// can be removed once we've on v5 of `@typescript-eslint/experimental-utils`
1212
declare module '@typescript-eslint/experimental-utils/dist/ts-eslint/Rule' {
13-
export interface RuleMetaDataDocs {
14-
suggestion?: boolean;
13+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
14+
export interface RuleMetaData<TMessageIds extends string> {
15+
hasSuggestions?: boolean;
1516
}
1617
}
1718

src/rules/no-done-callback.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export default createRule({
4747
},
4848
schema: [],
4949
type: 'suggestion',
50+
hasSuggestions: true,
5051
},
5152
defaultOptions: [],
5253
create(context) {

src/rules/no-focused-tests.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export default createRule({
4949
},
5050
schema: [],
5151
type: 'suggestion',
52+
hasSuggestions: true,
5253
},
5354
defaultOptions: [],
5455
create: context => ({

src/rules/prefer-expect-assertions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ export default createRule<[RuleOptions], MessageIds>({
8484
suggestRemovingExtraArguments: 'Remove extra arguments',
8585
},
8686
type: 'suggestion',
87+
hasSuggestions: true,
8788
schema: [
8889
{
8990
type: 'object',

src/rules/prefer-strict-equal.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export default createRule({
2121
},
2222
type: 'suggestion',
2323
schema: [],
24+
hasSuggestions: true,
2425
},
2526
defaultOptions: [],
2627
create(context) {

tools/regenerate-docs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ const details: RuleDetails[] = Object.keys(config.configs.all.rules)
114114
description: rule.meta.docs.description,
115115
fixable: rule.meta.fixable
116116
? 'fixable'
117-
: rule.meta.docs.suggestion
117+
: rule.meta.hasSuggestions
118118
? 'suggest'
119119
: false,
120120
requiresTypeChecking: rule.meta.docs.requiresTypeChecking ?? false,

0 commit comments

Comments
 (0)