Page MenuHomePhabricator

Replace usage of jshint and/or jscs with eslint in MediaWiki extensions (clonable)
Open, Needs TriagePublic

Description

jshint and jscs have been phased out of our CI linting process with eslint, which handles both static analysis and code style. Here's an example conversion. You should use the config that's currently on https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript#Linting.

You'll need to remove any references to jshint/jscs, update the dependencies in package.json for eslint, configure it to run in Gruntfile.js, and then fix any failures.

The following extensions are candidates for conversion for the purposes of GCI, please check them off if you start working on them:

  • Buggy
  • CirrusSearch
  • CleanChanges @Zoranzoki21
  • CodeReview
  • CollaborationKit
  • Disambiguator
  • DismissableSiteNotice @Zoranzoki21
  • GoogleLogin
  • GWToolset
  • HoverGallery
  • SpamBlacklist @Esanders

I can add plenty more extensions if there's demand.

Mentors: @Legoktm, maybe @Jdforrester-WMF and @Esanders if they're interested.

Related Objects

Event Timeline

Legoktm created this task.Nov 26 2018, 2:31 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 26 2018, 2:31 AM
Legoktm updated the task description. (Show Details)Nov 26 2018, 2:32 AM

Yay, thanks! I've created corresponding tasks on the GCI website.

Change 475841 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/DismissableSiteNotice@master] build: Replace jshint/jscs with eslint & stylelint

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

Change 475841 merged by jenkins-bot:
[mediawiki/extensions/DismissableSiteNotice@master] build: Replace jshint/jscs with eslint & stylelint

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

Legoktm updated the task description. (Show Details)Nov 27 2018, 10:06 PM
Pjht added a subscriber: Pjht.Nov 28 2018, 7:06 PM
Pjht removed a subscriber: Pjht.

Change 476373 had a related patch set uploaded (by Pjht; owner: Pjht):
[mediawiki/extensions/CollaborationKit@master] Replace jshint with eslint

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

Zoranzoki21 updated the task description. (Show Details)Nov 29 2018, 8:32 AM
Zoranzoki21 added a subscriber: Zoranzoki21.

Change 476457 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/HoverGallery@master] New version 1.2

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

Aklapper updated the task description. (Show Details)Nov 29 2018, 8:23 PM
Aklapper added a subscriber: Pjht.

Change 476457 abandoned by Zoranzoki21:
New version 1.2

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

Change 476842 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/Buggy@master] build: Replace jshint/jscs with eslint & stylelint

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

Zoranzoki21 updated the task description. (Show Details)Nov 30 2018, 12:38 PM

Change 476842 abandoned by Zoranzoki21:
build: Replace jshint/jscs with eslint & stylelint

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

Zoranzoki21 updated the task description. (Show Details)Nov 30 2018, 8:14 PM

Change 476917 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/CleanChanges@master] build: Replace jshint/jscs with eslint & stylelint

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

Change 476571 had a related patch set uploaded (by Jforrester; owner: Esanders):
[mediawiki/extensions/SpamBlacklist@master] build: Replace jshint with eslint

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

Change 476571 merged by jenkins-bot:
[mediawiki/extensions/SpamBlacklist@master] build: Replace jshint with eslint

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

Change 476917 merged by jenkins-bot:
[mediawiki/extensions/CleanChanges@master] build: Replace jshint/jscs with eslint & stylelint

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

Zoranzoki21 updated the task description. (Show Details)Dec 1 2018, 12:40 PM

Change 476373 abandoned by Pjht:
Replace jslint and jscs with eslint

Reason:
This is getting too hard. I’m abandoning this and the GCI task.

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

Zoranzoki21 updated the task description. (Show Details)Dec 5 2018, 6:44 PM

Change 477843 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/CollaborationKit@master] build: Replace jshint/jscs with eslint & stylelint

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

Change 478422 had a related patch set uploaded (by Stibba; owner: Stibba):
[mediawiki/extensions/GoogleLogin@master] build: Replace jshint with eslint & stylelint

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

Change 478422 merged by jenkins-bot:
[mediawiki/extensions/GoogleLogin@master] build: Replace jshint with eslint & stylelint

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

Zoranzoki21 updated the task description. (Show Details)Jan 2 2019, 6:05 PM

Change 477843 abandoned by Zoranzoki21:
build: Replace jshint/jscs with eslint

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

Change 488908 had a related patch set uploaded (by Mvolz; owner: Mvolz):
[mediawiki/services/citoid@master] Remove jshint && mocha-eslint

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

Mvolz added a subscriber: Mvolz.Feb 7 2019, 11:32 AM

Change 488908 merged by jenkins-bot:
[mediawiki/services/citoid@master] Remove jshint && mocha-eslint

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

Pjht removed a subscriber: Pjht.Apr 5 2019, 8:23 PM