Skip to content

Commit

Permalink
Merge branch 'main' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Sep 20, 2021
2 parents 6aa7eea + aa249a2 commit 74cd2ae
Show file tree
Hide file tree
Showing 10 changed files with 199 additions and 1,021 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
run: yarn test --coverage
env:
CI: true
- uses: codecov/codecov-action@v2.0.3
- uses: codecov/codecov-action@v2.1.0
if: always()
test-os:
name: Test on ${{ matrix.os }} using Node.js LTS
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,20 @@

* Drop support for Node 10 and 15

## [24.4.2](https://github.com/jest-community/eslint-plugin-jest/compare/v24.4.1...v24.4.2) (2021-09-17)


### Bug Fixes

* 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))

## [24.4.1](https://github.com/jest-community/eslint-plugin-jest/compare/v24.4.0...v24.4.1) (2021-09-17)


### Bug Fixes

* 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))

# [24.4.0](https://github.com/jest-community/eslint-plugin-jest/compare/v24.3.7...v24.4.0) (2021-07-21)


Expand Down
8 changes: 4 additions & 4 deletions docs/rules/valid-title.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,11 @@ specific Jest test function groups (`describe`, `test`, and `it`).
Examples of **incorrect** code when using `mustMatch`:

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

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

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

// with mustMatch: { test: '$that' }
// with mustMatch: { test: '^that' }
describe('the tests that will be run', () => {});
test('that the stuff works', () => {});
xtest('that errors that thrown have messages', () => {});
Expand Down
7 changes: 4 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ type RuleModule = TSESLint.RuleModule<string, unknown[]> & {
meta: Required<Pick<TSESLint.RuleMetaData<string>, 'docs'>>;
};

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

Expand Down
1 change: 1 addition & 0 deletions src/rules/no-done-callback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default createRule({
},
schema: [],
type: 'suggestion',
hasSuggestions: true,
},
defaultOptions: [],
create(context) {
Expand Down
1 change: 1 addition & 0 deletions src/rules/no-focused-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export default createRule({
},
schema: [],
type: 'suggestion',
hasSuggestions: true,
},
defaultOptions: [],
create: context => ({
Expand Down
1 change: 1 addition & 0 deletions src/rules/prefer-expect-assertions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export default createRule<[RuleOptions], MessageIds>({
suggestRemovingExtraArguments: 'Remove extra arguments',
},
type: 'suggestion',
hasSuggestions: true,
schema: [
{
type: 'object',
Expand Down
1 change: 1 addition & 0 deletions src/rules/prefer-strict-equal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default createRule({
},
type: 'suggestion',
schema: [],
hasSuggestions: true,
},
defaultOptions: [],
create(context) {
Expand Down
2 changes: 1 addition & 1 deletion tools/regenerate-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const details: RuleDetails[] = Object.keys(config.configs.all.rules)
description: rule.meta.docs.description,
fixable: rule.meta.fixable
? 'fixable'
: rule.meta.docs.suggestion
: rule.meta.hasSuggestions
? 'suggest'
: false,
requiresTypeChecking: rule.meta.docs.requiresTypeChecking ?? false,
Expand Down
Loading

0 comments on commit 74cd2ae

Please sign in to comment.