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

eslint-config: add rule for config to work properly #41272

Closed
wants to merge 1 commit into from
Closed

eslint-config: add rule for config to work properly #41272

wants to merge 1 commit into from

Conversation

rick-ame
Copy link

@rick-ame rick-ame commented Nov 1, 2023

Summary:

add no-global-assign to @react-native/eslint-config package.

without this rule, redefine global variable there is no hint,
截屏2023-11-01 14 20 40
with this rule enabled:
截屏2023-11-01 14 27 09

platform: vscode@latest, macos@14.0 (23A344)

Changelog:

[General] [Fixed] - eslint config global vars redefine there is no message tip

Test Plan:

tested locally

@facebook-github-bot
Copy link
Contributor

Hi @rick-ast!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@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. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Nov 1, 2023
Copy link
Contributor

@cipolleschi cipolleschi left a comment

Choose a reason for hiding this comment

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

@rick-ast Thank you so much for the contribution!

@cipolleschi
Copy link
Contributor

/rebase - this comment will trigger an automatic rebase on top of main.

@facebook-github-bot
Copy link
Contributor

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

Copy link

github-actions bot commented Nov 2, 2023

This pull request was successfully merged by @rick-ast in a2a219c.

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

@github-actions github-actions bot added the Merged This PR has been merged. label Nov 2, 2023
@rick-ame rick-ame deleted the eslint-globals branch November 4, 2023 04:23
Othinn pushed a commit to Othinn/react-native that referenced this pull request Jan 9, 2024
Summary:
add [no-global-assign](https://eslint.org/docs/latest/rules/no-global-assign#rule-details) to react-native/eslint-config package.

without this rule, redefine global variable there is no hint,
<img width="462" alt="截屏2023-11-01 14 20 40" src="https://github.com/facebook/react-native/assets/130942798/ff87633d-b1a1-4a8f-9f3f-e2e30f5b87ab">
with this rule enabled:
<img width="648" alt="截屏2023-11-01 14 27 09" src="https://github.com/facebook/react-native/assets/130942798/23ec322f-66e2-49a3-b6df-b3ba2549681b">

platform: vscode@latest, macos@14.0 (23A344)
## Changelog:

[General] [Fixed]  - eslint config global vars redefine there is no message tip

<!-- Help reviewers and the release process by writing your own changelog entry.
- add `no-global-assign` to eslint config to enable globals
Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

Pull Request resolved: facebook#41272

Test Plan: tested locally

Reviewed By: yungsters

Differential Revision: D50893943

Pulled By: cipolleschi

fbshipit-source-id: 2d418e1ca64722ebf48b52c2c0fe36fb392d7cb9
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. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants