Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update eslint plugin versions #420

Merged
merged 1 commit into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .changeset/proud-chairs-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
'@shopify/eslint-plugin': major
---

Update required eslint version to `^8.56.0` as required by the newest version of `@typescript-eslint/eslint-plugin`.

Update required node version to `18.20.0` as required by the newest version of `@typescript-eslint/eslint-plugin`.

The `jest/no-if` rule has been removed and replaced with `jest/no-conditional-in-test`.

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.

Update eslint plugins to new versions:

- `@typescript-eslint/eslint-plugin`: `^6.2.1` -> `^7.9.0` **MAJOR**
- `eslint-config-prettier`: `^8.10.0` -> `^9.1.0` **MAJOR**
- `eslint-plugin-jest`: `^27.2.3` => `^28.5.0` **MAJOR**
- `eslint-plugin-jsx-ally`: `^6.7.1` => `^6.8.0`
- `eslint-plugin-prettier`: `^5.0.0` => `^5.1.3`
- `eslint-plugin-react`: `^7.33.1` => `^7.34.1`
- `eslint-plugin-react-hooks`: `^4.6.0` => `^4.6.2`
- `eslint-plugin-sort-class-members`: `^1.18.0` => `^1.20.0`

See package changelogs for breaking change information:

- [`@typescript-eslint/eslint-plugin` breaking changes](https://typescript-eslint.io/blog/announcing-typescript-eslint-v7/)
- [`@eslint-plugin-jest` breaking changes](https://github.com/jest-community/eslint-plugin-jest/releases/tag/v28.0.0)
- [`eslint-config-prettier` breaking changes](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-900-2023-08-05)
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18.16.0
node-version: 18.20.0

- name: Check for Changeset
run: npx @changesets/cli status --since="origin/main"
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18.16.0
node-version: 18.20.0
cache: 'yarn'

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion dev.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: web-configs
up:
- node:
version: v18.16.0
version: v18.20.0
yarn: v1.22.5
commands:
__default__: start
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@changesets/cli": "^2.26.1",
"@shopify/tophat": "^0.0.4",
"@types/jest": "^26.0.24",
"eslint": "^8.3.0",
"eslint": "^8.56.0",
"fs-extra": "^9.0.0",
"glob": "^7.1.6",
"jest": "^29.6.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/lib/config/jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ module.exports = {
// Disallow duplicate hooks within a `describe` block
'jest/no-duplicate-hooks': 'error',
// Disallow conditional logic
'jest/no-if': 'error',
'jest/no-conditional-in-test': 'error',
// Prevent assertions that are conditional.
'jest/no-conditional-expect': 'error',
// Disallow export from test files
Expand Down
24 changes: 12 additions & 12 deletions packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,30 @@
"dependencies": {
"@babel/eslint-parser": "^7.16.3",
"@babel/eslint-plugin": "^7.14.5",
"@typescript-eslint/eslint-plugin": "^6.2.1",
"@typescript-eslint/parser": "^6.2.1",
"@typescript-eslint/eslint-plugin": "^7.9.0",
"@typescript-eslint/parser": "^7.9.0",
"change-case": "^4.1.2",
"common-tags": "^1.8.2",
"doctrine": "^2.1.0",
"eslint-config-prettier": "^8.10.0",
"eslint-module-utils": "^2.7.1",
"eslint-config-prettier": "^9.1.0",
"eslint-module-utils": "^2.8.1",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-jest": "^27.2.3",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^28.5.0",
"eslint-plugin-jest-formatting": "^3.1.0",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.33.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-sort-class-members": "^1.18.0",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-sort-class-members": "^1.20.0",
"jsx-ast-utils": "^3.2.1",
"pkg-dir": "^5.0.0",
"pluralize": "^8.0.0"
},
"peerDependencies": {
"eslint": "^8.3.0"
"eslint": "^8.56.0"
},
"devDependencies": {
"react": "^16.13.1",
Expand Down
1 change: 1 addition & 0 deletions test/consistent-changelogs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ readChangelogs().forEach(({packageChangelogPath, packageChangelog}) => {
const headerLines = packageChangelog
.split('\n')
.filter(
// eslint-disable-next-line jest/no-conditional-in-test
(line) => HEADER_START_REGEX.exec(line) || /## Unreleased/.exec(line),
)
.sort();
Expand Down
Loading
Loading