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.
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Jdlrobson | T195473 [GOAL] Invest in the MobileFrontend & MinervaNeue frontend architecture | |||
Resolved | Jdlrobson | T195475 [EPIC] Automate asset bundling in MobileFrontend | |||
Resolved | Jdlrobson | T202753 Enable ES6 syntax for src/ | |||
Resolved | Jdlrobson | T203976 Guard against ES6 code getting into production accidentally |
Event Timeline
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.
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?
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)