Page MenuHomePhabricator

[RN72][skip-ci] Manual ESLint fixes
ClosedPublic

Authored by ashoat on Jan 4 2024, 12:34 PM.
Tags
None
Referenced Files
F3401951: D10540.id35213.diff
Mon, Dec 2, 2:39 PM
F3401873: D10540.id35234.diff
Mon, Dec 2, 2:23 PM
F3401514: D10540.diff
Mon, Dec 2, 12:32 PM
Unknown Object (File)
Oct 31 2024, 5:22 AM
Unknown Object (File)
Oct 20 2024, 2:32 AM
Unknown Object (File)
Oct 3 2024, 1:24 PM
Unknown Object (File)
Oct 3 2024, 1:24 PM
Unknown Object (File)
Oct 3 2024, 1:24 PM
Subscribers

Details

Summary

These fixes had to be applied manually. They are in three categories:

  1. Prettier has deprecated support for Flow comment syntax. Running Prettier on code that includes Flow comment syntax results in those comments being stripped, which doesn't work for us. To get around this, I added some prettier-ignore annotations. I also tested and confirmed that we still can't use prettier-ignore for the import type declaration at the top of services/electron-update-server/index.js.
  2. The react/no-deprecated rule is now flagging our usage of the deprecated ReactDOMServer.renderToNodeStream utility. Migrating to ReactDOMServer.renderToPipeableStream is tracked in ENG-2512.
  3. The react/jsx-key rule started flagging the updated code in native/avatars/avatar-hooks.js. I don't think this list is actually rendered directly by the @expo/react-native-action-sheet code, so the key prop isn't really necessary. But I figured that it doesn't hurt it anyways.

Depends on D10539

Test Plan

Run yarn eslint:fix from the repo root and confirm no errors are printed and no changes are made

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul added inline comments.
native/avatars/avatar-hooks.js
482 ↗(On Diff #35213)

We also could set key to option.id to avoid hardcoding icon name twice, but doesn't really matter

This revision is now accepted and ready to land.Jan 4 2024, 2:32 PM
This revision was landed with ongoing or failed builds.Jan 4 2024, 6:12 PM
This revision was automatically updated to reflect the committed changes.