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

BREAKING: Update ESLint from v7 to v8 #233

Merged
merged 1 commit into from
Aug 15, 2022
Merged

BREAKING: Update ESLint from v7 to v8 #233

merged 1 commit into from
Aug 15, 2022

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Aug 13, 2022

ESLint has been updated to v8 in all packages. This lets us use the latest version of ESLint in our other packages without getting peerDependency mismatch warnings.

The main change to be aware of is that four new recommended rules have been added:

Our validation script was broken in this update because ESLint stopped exporting their recommended configuration. patch-package was added so that we could patch ESLint to export this configuration. This was taken from #221, thanks @mcmire for this idea.

@Gudahtt Gudahtt changed the title Update eslint Update ESLint from v7 to v8 Aug 13, 2022
@Gudahtt
Copy link
Member Author

Gudahtt commented Aug 13, 2022

This depends upon #230 and #228

This is now ready for review

@Gudahtt Gudahtt changed the title Update ESLint from v7 to v8 BREAKING: Update ESLint from v7 to v8 Aug 13, 2022
@Gudahtt Gudahtt changed the base branch from main to eslint-plugin-jest@26.8.2 August 15, 2022 15:30
Base automatically changed from eslint-plugin-jest@26.8.2 to main August 15, 2022 17:14
ESLint has been updated to v8 in all packages. This lets us use the
latest version of ESLint in our other packages without getting
`peerDependency` mismatch warnings.

The main change to be aware of is that four new recommended rules have
been added:
* `no-loss-of-precision` [1]
* `no-nonoctal-decimal-escape` [2]
* `no-unsafe-optional-chaining` [3]
* `no-useless-backreference` [4]

Our validation script was broken in this update because ESLint stopped
exporting their recommended configuration. `patch-package` was added so
that we could patch ESLint to export this configuration. This was taken
from #221, thanks @mcmire for this idea.

[1]: https://eslint.org/docs/latest/rules/no-loss-of-precision
[2]: https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape
[3]: https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining
[4]: https://eslint.org/docs/latest/rules/no-useless-backreference
@Gudahtt Gudahtt marked this pull request as ready for review August 15, 2022 17:16
@Gudahtt Gudahtt requested a review from a team as a code owner August 15, 2022 17:16
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a quick check and didn't notice anything more that we need. Thanks for doing this!

@@ -30,14 +30,14 @@
"@metamask/eslint-config": "^9.0.0",
"@typescript-eslint/eslint-plugin": "^5.33.0",
"@typescript-eslint/parser": "^5.33.0",
"eslint": "^7.23.0",
"eslint": "^8.21.0",
"typescript": "^4.0.7"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should bump this eventually along with the other typescript packages, but not necessary now.

@Gudahtt Gudahtt merged commit e87d38a into main Aug 15, 2022
@Gudahtt Gudahtt deleted the update-eslint branch August 15, 2022 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants