Skip to content

Commit 26f5cd6

Browse files
authored
refactor(deps): use format rules from eslint-plugin-jest (#123)
* dep: update eslint-plugin-jest to 28 * fact: remove the use of jest-formating which is now inside the jets plugin
1 parent f564fa7 commit 26f5cd6

File tree

5 files changed

+92
-39
lines changed

5 files changed

+92
-39
lines changed

example-app/eslint-breaking-examples/break-jest-formatting-rules.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Save without formatting: [⌘ + K] > [S]
22

3-
// This should trigger an error breaking eslint-jest-formatting rule:
4-
// jest-formatting/padding-around-all
3+
// This should trigger an error breaking eslint-pluging-jest rule:
4+
// jest/padding-around-all
55

66
it("a test", () => {
77
const abc = 123;

example-app/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
"eslint-config-prettier": "^9.0.0",
2020
"eslint-import-resolver-typescript": "^3.6.1",
2121
"eslint-plugin-import": "^2.29.1",
22-
"eslint-plugin-jest": "^27.2.2",
23-
"eslint-plugin-jest-formatting": "^3.1.0",
22+
"eslint-plugin-jest": "^28.9.0",
2423
"eslint-plugin-prettier": "^5.0.0",
2524
"eslint-plugin-react": "^7.31.11",
2625
"eslint-plugin-react-hooks": "^4.6.0",

packages/eslint-plugin/lib/configs/tests.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const testsConfig = defineConfig({
44
env: {
55
"jest/globals": true,
66
},
7-
plugins: ["jest", "jest-formatting", "testing-library"],
7+
plugins: ["jest", "testing-library"],
88
rules: {
99
// Setting the recommended rules manually, because we don't want warnings, only errors
1010
"jest/no-alias-methods": "error", // STYLE
@@ -26,7 +26,7 @@ export const testsConfig = defineConfig({
2626
"jest/valid-expect": "error",
2727
"jest/valid-expect-in-promise": "error",
2828
"jest/valid-title": ["error", { disallowedWords: ["should"] }], // STYLE
29-
"jest-formatting/padding-around-all": "error", // STYLE
29+
"jest/padding-around-all": "error", // STYLE
3030
"testing-library/await-async-queries": "error",
3131
"testing-library/no-manual-cleanup": "error",
3232
"testing-library/no-container": "error",

packages/eslint-plugin/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"eslint-import-resolver-typescript": "^3.6.1",
3333
"eslint-plugin-import": "^2.29.1",
3434
"eslint-plugin-jest": "^27.2.2",
35-
"eslint-plugin-jest-formatting": "^3.1.0",
3635
"eslint-plugin-prettier": "^5.0.0",
3736
"eslint-plugin-react": "^7.31.11",
3837
"eslint-plugin-react-hooks": "^4.6.0",
@@ -56,8 +55,7 @@
5655
"eslint-import-resolver-typescript": "^3.6.1",
5756
"eslint-plugin-eslint-plugin": "^5.1.0",
5857
"eslint-plugin-import": "^2.29.1",
59-
"eslint-plugin-jest": "^27.2.2",
60-
"eslint-plugin-jest-formatting": "^3.1.0",
58+
"eslint-plugin-jest": "^28.9.0",
6159
"eslint-plugin-prettier": "^5.0.0",
6260
"eslint-plugin-react": "^7.31.11",
6361
"eslint-plugin-react-hooks": "^4.6.0",

yarn.lock

Lines changed: 86 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,7 +1686,6 @@ __metadata:
16861686
eslint-import-resolver-typescript: ^3.6.1
16871687
eslint-plugin-import: ^2.29.1
16881688
eslint-plugin-jest: ^27.2.2
1689-
eslint-plugin-jest-formatting: ^3.1.0
16901689
eslint-plugin-prettier: ^5.0.0
16911690
eslint-plugin-react: ^7.31.11
16921691
eslint-plugin-react-hooks: ^4.6.0
@@ -1713,8 +1712,7 @@ __metadata:
17131712
eslint-import-resolver-typescript: "npm:^3.6.1"
17141713
eslint-plugin-eslint-plugin: "npm:^5.1.0"
17151714
eslint-plugin-import: "npm:^2.29.1"
1716-
eslint-plugin-jest: "npm:^27.2.2"
1717-
eslint-plugin-jest-formatting: "npm:^3.1.0"
1715+
eslint-plugin-jest: "npm:^28.9.0"
17181716
eslint-plugin-prettier: "npm:^5.0.0"
17191717
eslint-plugin-react: "npm:^7.31.11"
17201718
eslint-plugin-react-hooks: "npm:^4.6.0"
@@ -1736,7 +1734,6 @@ __metadata:
17361734
eslint-import-resolver-typescript: ^3.6.1
17371735
eslint-plugin-import: ^2.29.1
17381736
eslint-plugin-jest: ^27.2.2
1739-
eslint-plugin-jest-formatting: ^3.1.0
17401737
eslint-plugin-prettier: ^5.0.0
17411738
eslint-plugin-react: ^7.31.11
17421739
eslint-plugin-react-hooks: ^4.6.0
@@ -3956,6 +3953,16 @@ __metadata:
39563953
languageName: node
39573954
linkType: hard
39583955

3956+
"@typescript-eslint/scope-manager@npm:8.13.0":
3957+
version: 8.13.0
3958+
resolution: "@typescript-eslint/scope-manager@npm:8.13.0"
3959+
dependencies:
3960+
"@typescript-eslint/types": "npm:8.13.0"
3961+
"@typescript-eslint/visitor-keys": "npm:8.13.0"
3962+
checksum: 10c0/1924b3e740e244d98f8a99740b4196d23ae3263303b387c66db94e140455a3132e603a130f3f70fc71e37f4bda5d0c0c67224ae3911908b097ef3f972c136be4
3963+
languageName: node
3964+
linkType: hard
3965+
39593966
"@typescript-eslint/type-utils@npm:6.18.1":
39603967
version: 6.18.1
39613968
resolution: "@typescript-eslint/type-utils@npm:6.18.1"
@@ -3987,6 +3994,13 @@ __metadata:
39873994
languageName: node
39883995
linkType: hard
39893996

3997+
"@typescript-eslint/types@npm:8.13.0":
3998+
version: 8.13.0
3999+
resolution: "@typescript-eslint/types@npm:8.13.0"
4000+
checksum: 10c0/bd3f88b738a92b2222f388bcf831357ef8940a763c2c2eb1947767e1051dd2f8bee387020e8cf4c2309e4142353961b659abc2885e30679109a0488b0bfefc23
4001+
languageName: node
4002+
linkType: hard
4003+
39904004
"@typescript-eslint/typescript-estree@npm:5.62.0":
39914005
version: 5.62.0
39924006
resolution: "@typescript-eslint/typescript-estree@npm:5.62.0"
@@ -4024,6 +4038,25 @@ __metadata:
40244038
languageName: node
40254039
linkType: hard
40264040

4041+
"@typescript-eslint/typescript-estree@npm:8.13.0":
4042+
version: 8.13.0
4043+
resolution: "@typescript-eslint/typescript-estree@npm:8.13.0"
4044+
dependencies:
4045+
"@typescript-eslint/types": "npm:8.13.0"
4046+
"@typescript-eslint/visitor-keys": "npm:8.13.0"
4047+
debug: "npm:^4.3.4"
4048+
fast-glob: "npm:^3.3.2"
4049+
is-glob: "npm:^4.0.3"
4050+
minimatch: "npm:^9.0.4"
4051+
semver: "npm:^7.6.0"
4052+
ts-api-utils: "npm:^1.3.0"
4053+
peerDependenciesMeta:
4054+
typescript:
4055+
optional: true
4056+
checksum: 10c0/2d45bc5ed4ac352bea927167ac28ef23bd13b6ae352ff50e85cddfdc4b06518f1dd4ae5f2495e30d6f62d247987677a4e807065d55829ba28963908a821dc96d
4057+
languageName: node
4058+
linkType: hard
4059+
40274060
"@typescript-eslint/utils@npm:6.18.1":
40284061
version: 6.18.1
40294062
resolution: "@typescript-eslint/utils@npm:6.18.1"
@@ -4041,7 +4074,7 @@ __metadata:
40414074
languageName: node
40424075
linkType: hard
40434076

4044-
"@typescript-eslint/utils@npm:^5.10.0, @typescript-eslint/utils@npm:^5.38.1, @typescript-eslint/utils@npm:^5.58.0":
4077+
"@typescript-eslint/utils@npm:^5.38.1, @typescript-eslint/utils@npm:^5.58.0":
40454078
version: 5.62.0
40464079
resolution: "@typescript-eslint/utils@npm:5.62.0"
40474080
dependencies:
@@ -4059,6 +4092,20 @@ __metadata:
40594092
languageName: node
40604093
linkType: hard
40614094

4095+
"@typescript-eslint/utils@npm:^6.0.0 || ^7.0.0 || ^8.0.0":
4096+
version: 8.13.0
4097+
resolution: "@typescript-eslint/utils@npm:8.13.0"
4098+
dependencies:
4099+
"@eslint-community/eslint-utils": "npm:^4.4.0"
4100+
"@typescript-eslint/scope-manager": "npm:8.13.0"
4101+
"@typescript-eslint/types": "npm:8.13.0"
4102+
"@typescript-eslint/typescript-estree": "npm:8.13.0"
4103+
peerDependencies:
4104+
eslint: ^8.57.0 || ^9.0.0
4105+
checksum: 10c0/3fc5a7184a949df5f5b64f6af039a1d21ef7fe15f3d88a5d485ccbb535746d18514751143993a5aee287228151be3e326baf8f899a0a0a93368f6f20857ffa6d
4106+
languageName: node
4107+
linkType: hard
4108+
40624109
"@typescript-eslint/visitor-keys@npm:5.62.0":
40634110
version: 5.62.0
40644111
resolution: "@typescript-eslint/visitor-keys@npm:5.62.0"
@@ -4079,6 +4126,16 @@ __metadata:
40794126
languageName: node
40804127
linkType: hard
40814128

4129+
"@typescript-eslint/visitor-keys@npm:8.13.0":
4130+
version: 8.13.0
4131+
resolution: "@typescript-eslint/visitor-keys@npm:8.13.0"
4132+
dependencies:
4133+
"@typescript-eslint/types": "npm:8.13.0"
4134+
eslint-visitor-keys: "npm:^3.4.3"
4135+
checksum: 10c0/50b35f3cf673aaed940613f0007f7c4558a89ebef15c49824e65b6f084b700fbf01b01a4e701e24bbe651297a39678645e739acd255255f1603867a84bef0383
4136+
languageName: node
4137+
linkType: hard
4138+
40824139
"@ungap/structured-clone@npm:^1.2.0":
40834140
version: 1.2.0
40844141
resolution: "@ungap/structured-clone@npm:1.2.0"
@@ -6669,30 +6726,21 @@ __metadata:
66696726
languageName: node
66706727
linkType: hard
66716728

6672-
"eslint-plugin-jest-formatting@npm:^3.1.0":
6673-
version: 3.1.0
6674-
resolution: "eslint-plugin-jest-formatting@npm:3.1.0"
6675-
peerDependencies:
6676-
eslint: ">=0.8.0"
6677-
checksum: 10c0/fac94186abdfbb4059134171835fdce7941b09e3c0b6cab17661c2a2d6a80fc9452f476f0fe2062c524e08f9ff61cf1d669f7c6f7216db85016d2aeff701cbd6
6678-
languageName: node
6679-
linkType: hard
6680-
6681-
"eslint-plugin-jest@npm:^27.2.2":
6682-
version: 27.6.1
6683-
resolution: "eslint-plugin-jest@npm:27.6.1"
6729+
"eslint-plugin-jest@npm:^28.9.0":
6730+
version: 28.9.0
6731+
resolution: "eslint-plugin-jest@npm:28.9.0"
66846732
dependencies:
6685-
"@typescript-eslint/utils": "npm:^5.10.0"
6733+
"@typescript-eslint/utils": "npm:^6.0.0 || ^7.0.0 || ^8.0.0"
66866734
peerDependencies:
6687-
"@typescript-eslint/eslint-plugin": ^5.0.0 || ^6.0.0
6688-
eslint: ^7.0.0 || ^8.0.0
6735+
"@typescript-eslint/eslint-plugin": ^6.0.0 || ^7.0.0 || ^8.0.0
6736+
eslint: ^7.0.0 || ^8.0.0 || ^9.0.0
66896737
jest: "*"
66906738
peerDependenciesMeta:
66916739
"@typescript-eslint/eslint-plugin":
66926740
optional: true
66936741
jest:
66946742
optional: true
6695-
checksum: 10c0/61f5f8ba5a40fcc26918a5e5d740b6ab0ffcb7aee96f4e2357dac44217394d7805ba155e6deb5a3575e6dc369505f29aa17a39507c2aaa8fed9a676277bf3dbc
6743+
checksum: 10c0/56b0d2fb18a32bf56b0eb8c7790c355513535a239451d9d00184829cbd0ba35b6c68eec64e850a6299453f9c37338b6797d3184594c0326c8fdcc029024065b8
66966744
languageName: node
66976745
linkType: hard
66986746

@@ -7012,8 +7060,7 @@ __metadata:
70127060
eslint-config-prettier: "npm:^9.0.0"
70137061
eslint-import-resolver-typescript: "npm:^3.6.1"
70147062
eslint-plugin-import: "npm:^2.29.1"
7015-
eslint-plugin-jest: "npm:^27.2.2"
7016-
eslint-plugin-jest-formatting: "npm:^3.1.0"
7063+
eslint-plugin-jest: "npm:^28.9.0"
70177064
eslint-plugin-prettier: "npm:^5.0.0"
70187065
eslint-plugin-react: "npm:^7.31.11"
70197066
eslint-plugin-react-hooks: "npm:^4.6.0"
@@ -7262,7 +7309,7 @@ __metadata:
72627309
languageName: node
72637310
linkType: hard
72647311

7265-
"fast-glob@npm:^3.2.5, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.1":
7312+
"fast-glob@npm:^3.2.5, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.1, fast-glob@npm:^3.3.2":
72667313
version: 3.3.2
72677314
resolution: "fast-glob@npm:3.3.2"
72687315
dependencies:
@@ -10978,7 +11025,7 @@ __metadata:
1097811025
languageName: node
1097911026
linkType: hard
1098011027

10981-
"minimatch@npm:9.0.3, minimatch@npm:^9.0.0, minimatch@npm:^9.0.1, minimatch@npm:^9.0.3, minimatch@npm:~9.0.3":
11028+
"minimatch@npm:9.0.3":
1098211029
version: 9.0.3
1098311030
resolution: "minimatch@npm:9.0.3"
1098411031
dependencies:
@@ -11005,6 +11052,15 @@ __metadata:
1100511052
languageName: node
1100611053
linkType: hard
1100711054

11055+
"minimatch@npm:^9.0.0, minimatch@npm:^9.0.1, minimatch@npm:^9.0.3, minimatch@npm:^9.0.4, minimatch@npm:~9.0.3":
11056+
version: 9.0.5
11057+
resolution: "minimatch@npm:9.0.5"
11058+
dependencies:
11059+
brace-expansion: "npm:^2.0.1"
11060+
checksum: 10c0/de96cf5e35bdf0eab3e2c853522f98ffbe9a36c37797778d2665231ec1f20a9447a7e567cb640901f89e4daaa95ae5d70c65a9e8aa2bb0019b6facbc3c0575ed
11061+
languageName: node
11062+
linkType: hard
11063+
1100811064
"minimist-options@npm:4.1.0":
1100911065
version: 4.1.0
1101011066
resolution: "minimist-options@npm:4.1.0"
@@ -13483,7 +13539,7 @@ __metadata:
1348313539
languageName: node
1348413540
linkType: hard
1348513541

13486-
"semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.5.4":
13542+
"semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0":
1348713543
version: 7.6.3
1348813544
resolution: "semver@npm:7.6.3"
1348913545
bin:
@@ -14489,12 +14545,12 @@ __metadata:
1448914545
languageName: node
1449014546
linkType: hard
1449114547

14492-
"ts-api-utils@npm:^1.0.1":
14493-
version: 1.0.3
14494-
resolution: "ts-api-utils@npm:1.0.3"
14548+
"ts-api-utils@npm:^1.0.1, ts-api-utils@npm:^1.3.0":
14549+
version: 1.4.0
14550+
resolution: "ts-api-utils@npm:1.4.0"
1449514551
peerDependencies:
1449614552
typescript: ">=4.2.0"
14497-
checksum: 10c0/9408338819c3aca2a709f0bc54e3f874227901506cacb1163612a6c8a43df224174feb965a5eafdae16f66fc68fd7bfee8d3275d0fa73fbb8699e03ed26520c9
14553+
checksum: 10c0/1b2bfa50ea52771d564bb143bb69010d25cda03ed573095fbac9b86f717012426443af6647e00e3db70fca60360482a30c1be7cf73c3521c321f6bf5e3594ea0
1449814554
languageName: node
1449914555
linkType: hard
1450014556

0 commit comments

Comments
 (0)