-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Use the same JS language features as React Native #22
Comments
I’m 👍 on this if RN is a superset of ES2015. |
Sadly |
For reference: |
Missing from react-native:
Different defaults
|
For React Native, as a philosophy, we want to use es2015 and next. So if those transforms don't break any of our current apps and don't add any weight, we should add them to the preset. |
In react-native but afaict not (yet) in create-react-app:
|
|
fully agree with ^^ |
OK, the problem is the linting. Both async functions and class properties are not supported by eslint. We could use https://github.com/babel/babel-eslint but perhaps that is too nonstandard / not worth it just for this extra bit of compatibility. Any thoughts one way or the other? |
I'm against using babel-eslint for now. It is very fragile (no offense to maintainers, it's just a hard thing to do) and so people have been historically bumping into its issues many times. We can revisit this later if properties advance in TC39. |
OK well you mostly did this in #43 so this issue is all set, with the exception of |
It will make our open source stuff confusing if each project uses a slightly different subset of language features. Tricky to cut n paste from examples, etc. React Native is the trickiest to match because it doesn't actually ship in ES5 form so it's hard to alter the babel config for it. My proposal is that we take ES6 and then cherry-pick individual features til we have the ones React Native uses. If that seems like "the right thing" I can take this on; otherwise what is "the right thing" here?
The text was updated successfully, but these errors were encountered: