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.
Description
Details
Related Objects
Event Timeline
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
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
Change 940042 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Update eslint configuration to use es6 rules
Change 940088 merged by Nik Gkountas:
[mediawiki/extensions/ContentTranslation@master] CX ext.cx.dashboard.js: Migrate from ES5 to ES6
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
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
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
Change 940962 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] CX mw.cx.TranslationTracker.js: Migrate from ES5 to ES6
Change 940963 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] CX mw.cx.TranslationController.js: Migrate from ES5 to ES6
Change 940964 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] CX ve.dm.CXSectionNode.js: Migrate from ES5 to ES6
Change 941905 had a related patch set uploaded (by Wangombe; author: Wangombe):
[mediawiki/extensions/ContentTranslation@master] CX: CxUlsEntryPoint.vue: Migrate from ES5 to ES5
Change 944245 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):
[mediawiki/extensions/ContentTranslation@master] CX: Refactor mw.cx.SiteMapper.js
Change 941857 had a related patch set uploaded (by Wangombe; author: Wangombe):
[mediawiki/extensions/ContentTranslation@master] CX: relevantlanguages.js: Migrate from ES5 to ES6
Change 941857 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] CX: relevantlanguages.js: Migrate from ES5 to ES6
Change 941905 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] CX: CxUlsEntryPoint.vue: Migrate from ES5 to ES6
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
Change 944245 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] CX: Refactor mw.cx.SiteMapper.js
Change 951578 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] CX: mw.cx.TargetArticle.js: Migrate from ES5 to ES6
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
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
Change 955828 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] CX: Migrate mw.cx.init.Translation.js from ES5 to ES6
Change 955829 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] CX: Migrate mw.cx.dm.Translation.js from ES5 to ES6
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
Change 970789 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] CX: Refactor mw.cx.SuggestionList.js to ES6
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
Change 975052 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] CX: Refactor ve.init.mw.CXTarget.js to ES6
Change #1030992 had a related patch set uploaded (by Nik Gkountas; author: Esanders):
[mediawiki/extensions/ContentTranslation@master] ES6: Enforce no-var eslint rule
@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).