Page MenuHomePhabricator

Guard against ES6 code getting into production accidentally
Closed, ResolvedPublic3 Estimated Story Points

Description

We are concerned that now we are using webpack that ES6 syntax make leak into production, given we are working with Node modules.

Acceptance criteria

  • The resources/dist folder should be linted to check that it is using ES5 compatible syntax
  • If it's not possible to use an eslint config, we should add a transpiler to ensure this.

Sign off steps

  • Revisit the discussion in T202753 and create a new task if we feel like the concerns raised there have not been addressed.

Event Timeline

Jdlrobson triaged this task as Medium priority.Sep 10 2018, 5:01 PM
Jdlrobson created this task.
ovasileva set the point value for this task to 3.Sep 12 2018, 4:50 PM

Change 464017 had a related patch set uploaded (by Niedzielski; owner: Stephen Niedzielski):
[mediawiki/extensions/MobileFrontend@master] Fix: lint ES5 syntax and fix offender

https://gerrit.wikimedia.org/r/464017

Change 464017 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Fix: lint ES5 syntax and fix offender

https://gerrit.wikimedia.org/r/464017

Jdlrobson updated the task description. (Show Details)

Added a const to the code. Compiled it.
npm test complained.
Works!
Solution is also clean.
T202746 captures next step.