-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Add global flow types to eslint globals #5585
Conversation
Added a subset of the global flow types from the fbjs eslint config to remove the no-undef warnings for flow types
cc @satya164 |
Nice thanks! @facebook-github-bot shipit |
Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/965937440120672/int_phab to review. |
@@ -0,0 +1,5 @@ | |||
{ | |||
"rules": { | |||
"no-alert": 0 |
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.
FYI, you can do
/* eslint no-alert: 0 */
at the top of the file in order to disable it for a specific file
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.
@vjeux Yes, I figured we could allow it for every file in examples instead of adding the rule per file since it was already used in a bunch of different files and it's pretty common to want to show a simple alert in examples.
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.
Makes sense
Summary: Added a subset of the global flow types from the fbjs eslint config to remove the no-undef errors for flow types as well as a few missing browser globals that were used in the codebase. I also added a .eslintrc file to Examples to allow using alert there without warnings. Closes facebook#5585 Reviewed By: svcscm Differential Revision: D2872016 Pulled By: vjeux fb-gh-sync-id: f9b1b511289425393074b7237049dec38ea407b6
Added a subset of the global flow types from the fbjs eslint config to remove the no-undef errors for flow types as well as a few missing browser globals that were used in the codebase.
I also added a .eslintrc file to Examples to allow using alert there without warnings.