Page MenuHomePhabricator

CX: Migrate codebase from ES5 to ES6
Closed, ResolvedPublic

Description

Currently the CX codebase (i.e. all the code that lives inside ContentTranslation/modules directory) is written in ES5 and also the eslint rules applied are for ES5. However, since we are now able to use ES6 everywhere in ContentTranslation extension (https://phabricator.wikimedia.org/T333354), we should eventually migrate this codebase to ES6.

Event Timeline

ngkountas triaged this task as Medium priority.Jul 19 2023, 5:21 PM
ngkountas added a project: ContentTranslation.

Change 940042 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] Update eslint configuration to use es6 rules

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

Change 940088 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX ext.cx.dashboard.js: Migrate from ES5 to ES6

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

Change 940042 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Update eslint configuration to use es6 rules

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

Change 940088 merged by Nik Gkountas:

[mediawiki/extensions/ContentTranslation@master] CX ext.cx.dashboard.js: Migrate from ES5 to ES6

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

Change 940962 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX mw.cx.TranslationTracker.js: Migrate from ES5 to ES6

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

Change 940963 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX mw.cx.TranslationController.js: Migrate from ES5 to ES6

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

Change 940964 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX ve.dm.CXSectionNode.js: Migrate from ES5 to ES6

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

Change 940962 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX mw.cx.TranslationTracker.js: Migrate from ES5 to ES6

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

Change 940963 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX mw.cx.TranslationController.js: Migrate from ES5 to ES6

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

Change 940964 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX ve.dm.CXSectionNode.js: Migrate from ES5 to ES6

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

Change 941905 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/extensions/ContentTranslation@master] CX: CxUlsEntryPoint.vue: Migrate from ES5 to ES5

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

Change 944245 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX: Refactor mw.cx.SiteMapper.js

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

Change 941857 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/extensions/ContentTranslation@master] CX: relevantlanguages.js: Migrate from ES5 to ES6

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

Change 941857 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX: relevantlanguages.js: Migrate from ES5 to ES6

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

Change 941905 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX: CxUlsEntryPoint.vue: Migrate from ES5 to ES6

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

Change 951578 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/extensions/ContentTranslation@master] CX: mw.cx.TargetArticle.js: Migrate from ES5 to ES6

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

Change 944245 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX: Refactor mw.cx.SiteMapper.js

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

Change 951578 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX: mw.cx.TargetArticle.js: Migrate from ES5 to ES6

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

Change 955828 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX: Migrate mw.cx.init.Translation.js from ES5 to ES6

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

Change 955829 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX: Migrate mw.cx.dm.Translation.js from ES5 to ES6

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

Change 955828 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX: Migrate mw.cx.init.Translation.js from ES5 to ES6

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

Change 955829 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX: Migrate mw.cx.dm.Translation.js from ES5 to ES6

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

Change 970789 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX: Refactor mw.cx.SuggestionList.js to ES6

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

Change 970789 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX: Refactor mw.cx.SuggestionList.js to ES6

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

Change 975052 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX: Refactor ve.init.mw.CXTarget.js to ES6

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

Change 975052 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX: Refactor ve.init.mw.CXTarget.js to ES6

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

Change #1030992 had a related patch set uploaded (by Nik Gkountas; author: Esanders):

[mediawiki/extensions/ContentTranslation@master] ES6: Enforce no-var eslint rule

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

@Pginer-WMF Following the latest work, this task can be closed as done!

The eslint configuration has also been updated to force es6 syntax (https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ContentTranslation/+/940042) and usage of var keyword will currently lead to errors (https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ContentTranslation/+/1030992).