Page MenuHomePhabricator

Enable ES6 syntax for src/
Closed, ResolvedPublic

Description

This task encompasses the work to enable ES6 syntax via Babel transpilation for functional and test code under src/. Code under src/ and webpack.config.js should be revised as part of this task at minimum to use import and export instead of require and module.exports.

Event Timeline

Niedzielski created this task.
Jdlrobson lowered the priority of this task from High to Medium.Aug 28 2018, 10:35 PM
Jdlrobson subscribed.

I'd like to see us the path of least resistance for the time being (module.exports and require) until we've ported the entirety of mobile.startup. I've expanded the scope of T202746 and will schedule the work for us after porting mobile.startup has happened.

Not a duplicate since this task adds a transpiler and the other is about linting. Respectfully disagree to wait on enabling this functionality. It could be a great help to porting, eliminate ES6 in dist/ concerns, and parallelize work. Let's chat when I get back!

T202746 has been updated to encompass transpiling (we can't do this without linting IMO - those two come together). My concern with doing this early is that we already have a lot of files to port over, each with their problems. From experience observing how we worked in the Popups, I think changing the syntax as the same time is super risky and I'd rather do that once the repo is in a better shape.
Let's definitely chat about when we get back. I'll keep this open until then.

I've opened up T203976 for dealing with protecting our codebase via a linter.
T202746 now reads a lot like this task - can they be merged?

This task is more about the creating the minimal config and T202746 looks to be more about porting. Maybe T202753 can be a child of T202746?

T203976 is about guarding the code without proposing a solution (either using eslint or installing a transpiler). If this task is about minimal config it suggests a solution (the former). Thus are these not the same?

Ah, I think I'v gotten a bit lost! Well, we know that we want the transpiler eventually but we're uncertain on the linter so I think we should keep this task, T202753, distinct but T202746 can probably be rolled into T203976 or vice-versa.

Jdlrobson claimed this task.

I've added a sign off step in T203976 to refer back to this task and create a new task if necessary. I'm also a bit lost, so I'd rather resume this conversation after we've addressed the ES6 issue and have further information (ie. how we fixed that)