-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Conversation
Hi @rick-ast! Thank you for your pull request and welcome to our community. Action RequiredIn 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. ProcessIn 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 If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
There was a problem hiding this 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!
/rebase - this comment will trigger an automatic rebase on top of main. |
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
This pull request was successfully merged by @rick-ast in a2a219c. When will my fix make it into a release? | Upcoming Releases |
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
Summary:
add no-global-assign to @react-native/eslint-config package.
without this rule, redefine global variable there is no hint,
with this rule enabled:
platform: vscode@latest, macos@14.0 (23A344)
Changelog:
[General] [Fixed] - eslint config global vars redefine there is no message tip
Test Plan:
tested locally