Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jest-community/eslint-plugin-jest
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v24.4.1
Choose a base ref
...
head repository: jest-community/eslint-plugin-jest
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v24.4.2
Choose a head ref
  • 3 commits
  • 9 files changed
  • 3 contributors

Commits on Sep 17, 2021

  1. Copy the full SHA
    46ac6fc View commit details
  2. Copy the full SHA
    dfd2368 View commit details
  3. chore(release): 24.4.2 [skip ci]

    ## [24.4.2](v24.4.1...v24.4.2) (2021-09-17)
    
    ### Bug Fixes
    
    * use correct property `hasSuggestions` rather than `hasSuggestion` ([#899](#899)) ([dfd2368](dfd2368))
    semantic-release-bot committed Sep 17, 2021
    Copy the full SHA
    514e841 View commit details
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [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)


8 changes: 4 additions & 4 deletions docs/rules/valid-title.md
Original file line number Diff line number Diff line change
@@ -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', () => {});
@@ -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', () => {});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-jest",
"version": "24.4.1",
"version": "24.4.2",
"description": "Eslint rules for Jest",
"keywords": [
"eslint",
8 changes: 2 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -8,15 +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> {
hasSuggestion?: boolean;
hasSuggestions?: boolean;
}
}

2 changes: 1 addition & 1 deletion src/rules/no-done-callback.ts
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ export default createRule({
},
schema: [],
type: 'suggestion',
hasSuggestion: true,
hasSuggestions: true,
},
defaultOptions: [],
create(context) {
2 changes: 1 addition & 1 deletion src/rules/no-focused-tests.ts
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ export default createRule({
},
schema: [],
type: 'suggestion',
hasSuggestion: true,
hasSuggestions: true,
},
defaultOptions: [],
create: context => ({
2 changes: 1 addition & 1 deletion src/rules/prefer-expect-assertions.ts
Original file line number Diff line number Diff line change
@@ -84,7 +84,7 @@ export default createRule<[RuleOptions], MessageIds>({
suggestRemovingExtraArguments: 'Remove extra arguments',
},
type: 'suggestion',
hasSuggestion: true,
hasSuggestions: true,
schema: [
{
type: 'object',
2 changes: 1 addition & 1 deletion src/rules/prefer-strict-equal.ts
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ export default createRule({
},
type: 'suggestion',
schema: [],
hasSuggestion: true,
hasSuggestions: true,
},
defaultOptions: [],
create(context) {
2 changes: 1 addition & 1 deletion tools/regenerate-docs.ts
Original file line number Diff line number Diff line change
@@ -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.hasSuggestion
: rule.meta.hasSuggestions
? 'suggest'
: false,
requiresTypeChecking: rule.meta.docs.requiresTypeChecking ?? false,