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: v27.1.2
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: v27.1.3
Choose a head ref
  • 4 commits
  • 5 files changed
  • 3 contributors

Commits on Oct 14, 2022

  1. Copy the full SHA
    f5b76c0 View commit details

Commits on Oct 18, 2022

  1. Copy the full SHA
    7872896 View commit details
  2. Copy the full SHA
    4450daa View commit details
  3. chore(release): 27.1.3 [skip ci]

    ## [27.1.3](v27.1.2...v27.1.3) (2022-10-18)
    
    ### Bug Fixes
    
    * **no-restricted-jest-methods:** don't crash on `jest()` ([#1269](#1269)) ([4450daa](4450daa))
    semantic-release-bot committed Oct 18, 2022
    Copy the full SHA
    9658dbb View commit details
Showing with 586 additions and 573 deletions.
  1. +8 −1 CHANGELOG.md
  2. +1 −1 package.json
  3. +1 −0 src/rules/__tests__/no-restricted-jest-methods.test.ts
  4. +1 −1 src/rules/no-restricted-jest-methods.ts
  5. +575 −570 yarn.lock
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
## [27.1.3](https://github.com/jest-community/eslint-plugin-jest/compare/v27.1.2...v27.1.3) (2022-10-18)


### Bug Fixes

* **no-restricted-jest-methods:** don't crash on `jest()` ([#1269](https://github.com/jest-community/eslint-plugin-jest/issues/1269)) ([4450daa](https://github.com/jest-community/eslint-plugin-jest/commit/4450daa17ae542bbfed85d16845c5dac1c310dea))

## [27.1.2](https://github.com/jest-community/eslint-plugin-jest/compare/v27.1.1...v27.1.2) (2022-10-14)


### Bug Fixes

* **valid-expect-in-promise:** adjust grammer in rule message ([#1264](https://github.com/jest-community/eslint-plugin-jest/issues/1264)) ([4494ed2](https://github.com/jest-community/eslint-plugin-jest/commit/4494ed21686edeb1bc4535cb2159989f87a7493e))
* **valid-expect-in-promise:** adjust grammar in rule message ([#1264](https://github.com/jest-community/eslint-plugin-jest/issues/1264)) ([4494ed2](https://github.com/jest-community/eslint-plugin-jest/commit/4494ed21686edeb1bc4535cb2159989f87a7493e))

## [27.1.1](https://github.com/jest-community/eslint-plugin-jest/compare/v27.1.0...v27.1.1) (2022-10-05)

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": "27.1.2",
"version": "27.1.3",
"description": "ESLint rules for Jest",
"keywords": [
"eslint",
1 change: 1 addition & 0 deletions src/rules/__tests__/no-restricted-jest-methods.test.ts
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@ const ruleTester = new TSESLint.RuleTester({
ruleTester.run('no-restricted-jest-methods', rule, {
valid: [
'jest',
'jest()',
'jest.mock()',
'expect(a).rejects;',
'expect(a);',
2 changes: 1 addition & 1 deletion src/rules/no-restricted-jest-methods.ts
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ export default createRule<
CallExpression(node) {
const jestFnCall = parseJestFnCall(node, context);

if (jestFnCall?.type !== 'jest') {
if (jestFnCall?.type !== 'jest' || jestFnCall.members.length === 0) {
return;
}

Loading