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

RN: Upgrade ESLint Packages #32560

Closed
wants to merge 3 commits into from
Closed

RN: Upgrade ESLint Packages #32560

wants to merge 3 commits into from

Conversation

yungsters
Copy link
Contributor

Summary

Upgrades ESLint to v7.28.0. This is the latest version before v8.0.0, which would be a more involved upgrade.

Upgrades all ESLint-related dependencies to their latest version, except for eslint-plugin-flowtype. This is because eslint-plugin-flowtype@8.0.0 dropped support for ESLint v7.

Changelog

[General][Changed] - Upgraded packages to the latest versions for ESLint v7.

Test Plan

# See no new errors or warnings.
$ yarn run lint

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Nov 8, 2021
@facebook-github-bot
Copy link
Contributor

@yungsters has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@analysis-bot
Copy link

analysis-bot commented Nov 8, 2021

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,477,687 +208
android hermes armeabi-v7a 7,774,697 +206
android hermes x86 8,946,879 +197
android hermes x86_64 8,893,840 +201
android jsc arm64-v8a 9,791,920 +35
android jsc armeabi-v7a 8,752,407 +23
android jsc x86 9,740,786 +35
android jsc x86_64 10,341,694 +36

Base commit: 74b91c5
Branch: main

@analysis-bot
Copy link

analysis-bot commented Nov 8, 2021

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 74b91c5
Branch: main

Summary:
Ignores the `Libraries/Renderer/` directory of files which are synchronized from React (and should not be modified).

Also, formats some EventEmitter modules that for some reason were missed when I upgraded to Prettier v2.x.

## Changelog

[Internal]

Pull Request resolved: facebook#32524

Test Plan:
```
yarn run format-check
```

Differential Revision: D32129837

Pulled By: yungsters

fbshipit-source-id: c013ead64fc4b4844f9848cd79f02e121fce3ab5
Summary:
Instead of using `.prettierrc` to ignore the files sync'd from React, replace `format` with `noformat`.

This is necessary because currently, the version of Prettier used in React Native (v2.4.1) differs from the version used in React (v1.19.1). We can revert this when React is upgraded.

Changelog:
[Internal]

Differential Revision: D32129937

fbshipit-source-id: 7393560f49c391680f49eaab8d45681e0151f4f0
Summary:
Upgrades ESLint to v7.28.0. This is the latest version before v8.0.0, which would be a more involved upgrade.

Upgrades all ESLint-related dependencies to their latest version, except for [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype/). This is because eslint-plugin-flowtype@8.0.0 dropped support for ESLint v7.

Configures ESLint for Metro to extend `plugin:prettier/recommended`.

## Changelog

[General][Changed] - Upgraded packages to the latest versions for ESLint v7.

Pull Request resolved: facebook#32560

Test Plan:
Run this on an open source checkout of `facebook/react-native`:

```
# See no new errors or warnings.
$ yarn run lint
```

Run this internally:

```
$ js1 test xplat/js/tools/__tests__/dependency-constraints-test.js
```

Verify linting works:

```
js1 lint xplat/js/RKJSModules/Libraries/Core/
```

Differential Revision: D32258399

Pulled By: yungsters

fbshipit-source-id: 6b19c1e2db13712103c5a1d504d68b3af4952ee6
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D32258399

facebook-github-bot pushed a commit that referenced this pull request Nov 9, 2021
Summary:
Upgrades ESLint to v7.28.0. This is the latest version before v8.0.0, which would be a more involved upgrade.

Upgrades all ESLint-related dependencies to their latest version, except for [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype/). This is because eslint-plugin-flowtype@8.0.0 dropped support for ESLint v7.

Configures ESLint for Metro to extend `plugin:prettier/recommended`.

## Changelog

[General][Changed] - Upgraded packages to the latest versions for ESLint v7.

Pull Request resolved: #32560

Test Plan:
Run this on an open source checkout of `facebook/react-native`:

```
# See no new errors or warnings.
$ yarn run lint
```

Run this internally:

```
$ js1 test xplat/js/tools/__tests__/dependency-constraints-test.js
```

Verify linting works:

```
js1 lint xplat/js/RKJSModules/Libraries/Core/
```

Reviewed By: lunaleaps

Differential Revision: D32258399

Pulled By: yungsters

fbshipit-source-id: d11b3fc3e33770157a90f3dee352cf80b39c442c
@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @yungsters in cf763cd.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Nov 9, 2021
@wcandillon
Copy link
Contributor

For this to work with eslint 8 and typescript, the eslint-typescript plugin needs to be upgraded to the latest version (5.4.0).

@yungsters you would like me to do a PR for it?

@yungsters
Copy link
Contributor Author

@wcandillon, sure! Thanks.

@Kerumen
Copy link
Contributor

Kerumen commented Dec 16, 2021

@wcandillon Were you able to set up a PR to upgrade the eslint-typescript plugin to support eslint v8? 🙏🏻

@wcandillon
Copy link
Contributor

@Kerumen yes at #33448

@yungsters yungsters deleted the eslint branch August 11, 2022 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants