Page MenuHomePhabricator

[RN72][skip-ci] Update ESLint & Prettier
ClosedPublic

Authored by ashoat on Jan 4 2024, 12:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 3, 1:24 PM
Unknown Object (File)
Thu, Oct 3, 1:24 PM
Unknown Object (File)
Thu, Oct 3, 1:24 PM
Unknown Object (File)
Thu, Oct 3, 1:24 PM
Unknown Object (File)
Sun, Sep 29, 6:26 PM
Unknown Object (File)
Aug 29 2024, 7:05 AM
Unknown Object (File)
Aug 27 2024, 9:21 PM
Unknown Object (File)
Aug 25 2024, 1:27 PM
Subscribers

Details

Summary

As part of upgrading to React Native 0.72, react-native-upgrade-helper prompts us to update ESLint to 8.

To separate this work out into its own independently-landable stack, I decided to make the ESLint update BEFORE making the React Native update.

For whatever reason, the React Native update does not have us update to Prettier 3. However, in my local environment I was able to make that update without any issues. As such, I decided to include it here as well.

Depends on D10537

Test Plan

Run yarn eslint:fix from the repo root

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ashoat added inline comments.
.eslintrc.json
16 ↗(On Diff #35211)

babel-eslint is deprecated in favor of @babel/eslint-parser

package.json
56 ↗(On Diff #35211)

The reason this change was initially made is explained here. @marcin's thinking at the time was that he wanted to force 13.20 to be used, but a transitive dependency used ^13.19, so we had to specify a Yarn resolution.

In fact, a Yarn resolution was never necessary. ^13.19 works with any higher minor version (such as 13.20). All that needed to be done in this case was clear the lockfile, and rerun yarn install, which would then pull in the latest version that matches ^13.19. The only reason we were "stuck" on 13.19 was because that was what was in our lockfile.

This revision is now accepted and ready to land.Jan 4 2024, 2:28 PM