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.0
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.1
Choose a head ref

Commits on Jul 25, 2021

  1. chore(deps): update actions/setup-node action to v2.3.0 (#862)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jul 25, 2021
    Copy the full SHA
    77e2883 View commit details

Commits on Jul 26, 2021

  1. Copy the full SHA
    8881aa9 View commit details

Commits on Aug 2, 2021

  1. Copy the full SHA
    a009a7e View commit details

Commits on Aug 9, 2021

  1. Copy the full SHA
    26806c3 View commit details

Commits on Aug 11, 2021

  1. Copy the full SHA
    0fca2fb View commit details
  2. Copy the full SHA
    af8e78c View commit details
  3. Copy the full SHA
    23b8a2a View commit details
  4. Copy the full SHA
    e2c4ea1 View commit details

Commits on Aug 16, 2021

  1. Copy the full SHA
    624a523 View commit details

Commits on Aug 23, 2021

  1. Copy the full SHA
    9b73aa5 View commit details

Commits on Sep 1, 2021

  1. chore: lock down TypeScript to 4.3

    Yarn v2 doesn't support 4.4
    SimenB committed Sep 1, 2021
    Copy the full SHA
    8d28298 View commit details

Commits on Sep 6, 2021

  1. Copy the full SHA
    363644f View commit details
  2. Copy the full SHA
    c2d75fc View commit details
  3. chore: update yarn

    SimenB committed Sep 6, 2021
    Copy the full SHA
    da95491 View commit details
  4. chore: update TypeScript

    SimenB committed Sep 6, 2021
    Copy the full SHA
    9422e72 View commit details

Commits on Sep 13, 2021

  1. Copy the full SHA
    889a03a View commit details
  2. Copy the full SHA
    9aeaf24 View commit details
  3. Copy the full SHA
    637249b View commit details
  4. Copy the full SHA
    34b23e6 View commit details

Commits on Sep 17, 2021

  1. Copy the full SHA
    ec0a21b View commit details
  2. chore(release): 24.4.1 [skip ci]

    ## [24.4.1](v24.4.0...v24.4.1) (2021-09-17)
    
    ### Bug Fixes
    
    * mark rules that suggest fixes with `hasSuggestion` for ESLint v8 ([#898](#898)) ([ec0a21b](ec0a21b))
    semantic-release-bot committed Sep 17, 2021
    Copy the full SHA
    1080ff3 View commit details
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v3
- uses: wagoid/commitlint-github-action@v4
with:
configFile: './package.json'
env:
18 changes: 9 additions & 9 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2.2.0
- uses: actions/setup-node@v2.4.0
with:
node-version: 14.x
cache: yarn
@@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.2.0
- uses: actions/setup-node@v2.4.0
with:
node-version: 14.x
cache: yarn
@@ -50,7 +50,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.2.0
- uses: actions/setup-node@v2.4.0
with:
node-version: 14.x
cache: yarn
@@ -74,7 +74,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.2.0
uses: actions/setup-node@v2.4.0
with:
node-version: ${{ matrix.node-version }}
cache: yarn
@@ -87,7 +87,7 @@ jobs:
run: yarn test --coverage ${{ matrix.eslint-version >= 6 }}
env:
CI: true
- uses: codecov/codecov-action@v1.5.2
- uses: codecov/codecov-action@v2.1.0
if: ${{ matrix.eslint-version >= 6 }}
test-os:
name: Test on ${{ matrix.os }} using Node.js LTS
@@ -100,7 +100,7 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.2.0
- uses: actions/setup-node@v2.4.0
with:
node-version: 14.x
cache: yarn
@@ -117,7 +117,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.2.0
- uses: actions/setup-node@v2.4.0
with:
node-version: 14.x
cache: yarn
@@ -134,13 +134,13 @@ jobs:
release:
if:
# prettier-ignore
${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }}
${{ github.event_name == 'push' && (github.event.ref == 'refs/heads/main' || github.event.ref == 'refs/heads/next') }}
name: Release new version
needs: [prettier, typecheck, test-node, test-os]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.2.0
- uses: actions/setup-node@v2.4.0
with:
node-version: 14.x
cache: yarn
10 changes: 5 additions & 5 deletions .yarn/releases/yarn-2.4.2.cjs → .yarn/releases/yarn-2.4.3.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -6,4 +6,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: '@yarnpkg/plugin-interactive-tools'

yarnPath: .yarn/releases/yarn-2.4.2.cjs
yarnPath: .yarn/releases/yarn-2.4.3.cjs
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [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)


7 changes: 6 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
'use strict';

const semver = require('semver');
const pkg = require('./package.json');

const supportedNodeVersion = semver.minVersion(pkg.engines.node).version;

// todo: https://github.com/babel/babel/issues/8529 :'(
module.exports = {
plugins: ['replace-ts-export-assignment'],
presets: [
'@babel/preset-typescript',
['@babel/preset-env', { targets: { node: 10 } }],
['@babel/preset-env', { targets: { node: supportedNodeVersion } }],
],
ignore: ['src/**/__tests__/fixtures/**'],
};
13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-jest",
"version": "24.4.0",
"version": "24.4.1",
"description": "Eslint rules for Jest",
"keywords": [
"eslint",
@@ -92,7 +92,7 @@
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/git": "^9.0.0",
"@types/dedent": "^0.7.0",
"@types/jest": "^26.0.0",
"@types/jest": "^27.0.0",
"@types/node": "^14.0.0",
"@types/prettier": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^4.0.1",
@@ -118,8 +118,9 @@
"resolve-from": "^5.0.0",
"rimraf": "^3.0.0",
"semantic-release": "^17.0.7",
"semver": "^7.3.5",
"ts-node": "^9.0.0",
"typescript": "^4.0.0"
"typescript": "^4.4.0"
},
"peerDependencies": {
"@typescript-eslint/eslint-plugin": ">= 4",
@@ -135,7 +136,11 @@
},
"release": {
"branches": [
"main"
"main",
{
"name": "next",
"prerelease": true
}
],
"plugins": [
"@semantic-release/commit-analyzer",
5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -13,6 +13,11 @@ 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;
}
}

// copied from https://github.com/babel/babel/blob/d8da63c929f2d28c401571e2a43166678c555bc4/packages/babel-helpers/src/helpers.js#L602-L606
1 change: 1 addition & 0 deletions src/rules/no-done-callback.ts
Original file line number Diff line number Diff line change
@@ -47,6 +47,7 @@ export default createRule({
},
schema: [],
type: 'suggestion',
hasSuggestion: true,
},
defaultOptions: [],
create(context) {
1 change: 1 addition & 0 deletions src/rules/no-focused-tests.ts
Original file line number Diff line number Diff line change
@@ -49,6 +49,7 @@ export default createRule({
},
schema: [],
type: 'suggestion',
hasSuggestion: true,
},
defaultOptions: [],
create: context => ({
1 change: 1 addition & 0 deletions src/rules/prefer-expect-assertions.ts
Original file line number Diff line number Diff line change
@@ -84,6 +84,7 @@ export default createRule<[RuleOptions], MessageIds>({
suggestRemovingExtraArguments: 'Remove extra arguments',
},
type: 'suggestion',
hasSuggestion: true,
schema: [
{
type: 'object',
1 change: 1 addition & 0 deletions src/rules/prefer-strict-equal.ts
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@ export default createRule({
},
type: 'suggestion',
schema: [],
hasSuggestion: 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.docs.suggestion
: rule.meta.hasSuggestion
? 'suggest'
: false,
requiresTypeChecking: rule.meta.docs.requiresTypeChecking ?? false,
2,537 changes: 1,309 additions & 1,228 deletions yarn.lock

Large diffs are not rendered by default.