Skip to content

Commit 32e249f

Browse files
authored
Update eslint plugin versions (#420)
Major updates: - Update required node version to `18.20.0` - Update required eslint version to `^8.56.0` - Update `@typescript-eslint/eslint-plugin` to `^7.9.0` - Update `eslint-plugin-jest` to `^28.5.0` - Update `eslint-config-prettier` to `^9.1.0`
1 parent d14c7a9 commit 32e249f

File tree

9 files changed

+1115
-711
lines changed

9 files changed

+1115
-711
lines changed

.changeset/proud-chairs-serve.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
'@shopify/eslint-plugin': major
3+
---
4+
5+
Update required eslint version to `^8.56.0` as required by the newest version of `@typescript-eslint/eslint-plugin`.
6+
7+
Update required node version to `18.20.0` as required by the newest version of `@typescript-eslint/eslint-plugin`.
8+
9+
The `jest/no-if` rule has been removed and replaced with `jest/no-conditional-in-test`.
10+
11+
The `unicode-bom` rule is no longer turned off if you enable the prettier ruleset per `eslint-config-prettier`, prettier preserves the bom value if it is present and does not add one if missing.
12+
13+
Update eslint plugins to new versions:
14+
15+
- `@typescript-eslint/eslint-plugin`: `^6.2.1` -> `^7.9.0` **MAJOR**
16+
- `eslint-config-prettier`: `^8.10.0` -> `^9.1.0` **MAJOR**
17+
- `eslint-plugin-jest`: `^27.2.3` => `^28.5.0` **MAJOR**
18+
- `eslint-plugin-jsx-ally`: `^6.7.1` => `^6.8.0`
19+
- `eslint-plugin-prettier`: `^5.0.0` => `^5.1.3`
20+
- `eslint-plugin-react`: `^7.33.1` => `^7.34.1`
21+
- `eslint-plugin-react-hooks`: `^4.6.0` => `^4.6.2`
22+
- `eslint-plugin-sort-class-members`: `^1.18.0` => `^1.20.0`
23+
24+
See package changelogs for breaking change information:
25+
26+
- [`@typescript-eslint/eslint-plugin` breaking changes](https://typescript-eslint.io/blog/announcing-typescript-eslint-v7/)
27+
- [`@eslint-plugin-jest` breaking changes](https://github.com/jest-community/eslint-plugin-jest/releases/tag/v28.0.0)
28+
- [`eslint-config-prettier` breaking changes](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-900-2023-08-05)

.github/workflows/changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Setup Node
2525
uses: actions/setup-node@v4
2626
with:
27-
node-version: 18.16.0
27+
node-version: 18.20.0
2828

2929
- name: Check for Changeset
3030
run: npx @changesets/cli status --since="origin/main"

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Setup Node
2121
uses: actions/setup-node@v4
2222
with:
23-
node-version: 18.16.0
23+
node-version: 18.20.0
2424
cache: 'yarn'
2525

2626
- name: Install dependencies

dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: web-configs
22
up:
33
- node:
4-
version: v18.16.0
4+
version: v18.20.0
55
yarn: v1.22.5
66
commands:
77
__default__: start

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@changesets/cli": "^2.26.1",
2020
"@shopify/tophat": "^0.0.4",
2121
"@types/jest": "^26.0.24",
22-
"eslint": "^8.3.0",
22+
"eslint": "^8.56.0",
2323
"fs-extra": "^9.0.0",
2424
"glob": "^7.1.6",
2525
"jest": "^29.6.2",

packages/eslint-plugin/lib/config/jest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ module.exports = {
7878
// Disallow duplicate hooks within a `describe` block
7979
'jest/no-duplicate-hooks': 'error',
8080
// Disallow conditional logic
81-
'jest/no-if': 'error',
81+
'jest/no-conditional-in-test': 'error',
8282
// Prevent assertions that are conditional.
8383
'jest/no-conditional-expect': 'error',
8484
// Disallow export from test files

packages/eslint-plugin/package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,30 +27,30 @@
2727
"dependencies": {
2828
"@babel/eslint-parser": "^7.16.3",
2929
"@babel/eslint-plugin": "^7.14.5",
30-
"@typescript-eslint/eslint-plugin": "^6.2.1",
31-
"@typescript-eslint/parser": "^6.2.1",
30+
"@typescript-eslint/eslint-plugin": "^7.9.0",
31+
"@typescript-eslint/parser": "^7.9.0",
3232
"change-case": "^4.1.2",
3333
"common-tags": "^1.8.2",
3434
"doctrine": "^2.1.0",
35-
"eslint-config-prettier": "^8.10.0",
36-
"eslint-module-utils": "^2.7.1",
35+
"eslint-config-prettier": "^9.1.0",
36+
"eslint-module-utils": "^2.8.1",
3737
"eslint-plugin-eslint-comments": "^3.2.0",
38-
"eslint-plugin-import": "^2.28.0",
39-
"eslint-plugin-jest": "^27.2.3",
38+
"eslint-plugin-import": "^2.29.1",
39+
"eslint-plugin-jest": "^28.5.0",
4040
"eslint-plugin-jest-formatting": "^3.1.0",
41-
"eslint-plugin-jsx-a11y": "^6.7.1",
41+
"eslint-plugin-jsx-a11y": "^6.8.0",
4242
"eslint-plugin-node": "^11.1.0",
43-
"eslint-plugin-prettier": "^5.0.0",
43+
"eslint-plugin-prettier": "^5.1.3",
4444
"eslint-plugin-promise": "^6.1.1",
45-
"eslint-plugin-react": "^7.33.1",
46-
"eslint-plugin-react-hooks": "^4.6.0",
47-
"eslint-plugin-sort-class-members": "^1.18.0",
45+
"eslint-plugin-react": "^7.34.1",
46+
"eslint-plugin-react-hooks": "^4.6.2",
47+
"eslint-plugin-sort-class-members": "^1.20.0",
4848
"jsx-ast-utils": "^3.2.1",
4949
"pkg-dir": "^5.0.0",
5050
"pluralize": "^8.0.0"
5151
},
5252
"peerDependencies": {
53-
"eslint": "^8.3.0"
53+
"eslint": "^8.56.0"
5454
},
5555
"devDependencies": {
5656
"react": "^16.13.1",

test/consistent-changelogs.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ readChangelogs().forEach(({packageChangelogPath, packageChangelog}) => {
4444
const headerLines = packageChangelog
4545
.split('\n')
4646
.filter(
47+
// eslint-disable-next-line jest/no-conditional-in-test
4748
(line) => HEADER_START_REGEX.exec(line) || /## Unreleased/.exec(line),
4849
)
4950
.sort();

0 commit comments

Comments
 (0)