Page MenuHomePhabricator

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

Description

jshint and jscs have been slowly removed from Wikimedia's Continuous Integration (CI) linting process. They get replaced with eslint, which handles both static analysis and code style.
Here is 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 the file package.json for eslintand eslint-config-wikimedia, configure it to run in Gruntfile.js, and then fix any failures.

The extensions in the list below are candidates for conversion for GCI. Please check them off (means: replace [ ] by [x]) in this Phabricator task if you start working on them, by clicking "Edit Task" in the upper right corner and updating the task description. (You need to be logged into Phabricator to do this. If you do not have an account in Wikimedia Phabricator yet, see the Phabricator help how to create an account here.)

For Wikimedia production extensions/skins, see T195542

Other extensions/skins

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

Mentors: @Legoktm, @Jdforrester-WMF and @Esanders

Details

ProjectBranchLines +/-Subject
mediawiki/extensions/LanguageSelectormaster+1 K -474
mediawiki/extensions/DeviceMapLogCapturemaster+1 K -439
mediawiki/extensions/DisableAccountmaster+1 K -438
mediawiki/extensions/OnlineStatusBarmaster+2 K -398
mediawiki/extensions/OracleTextSearchmaster+1 K -439
mediawiki/extensions/JsonDatamaster+145 -372
mediawiki/extensions/JSBreadCrumbsmaster+2 K -480
mediawiki/extensions/ContributionsListmaster+967 -374
mediawiki/extensions/QuickSearchLookupmaster+2 K -319
mediawiki/extensions/Quantcastmaster+969 -350
mediawiki/extensions/EditSimilarmaster+2 K -292
mediawiki/extensions/ThrottleOverridemaster+636 -267
mediawiki/extensions/TimelineTablemaster+2 K -218
mediawiki/extensions/TitleIconmaster+950 -290
mediawiki/extensions/TitleKeymaster+939 -284
mediawiki/extensions/TimeMachinemaster+939 -284
mediawiki/extensions/Draftsmaster+3 K -329
mediawiki/extensions/HeaderTabsmaster+4 K -455
mediawiki/extensions/RandomGameUnitmaster+3 K -344
mediawiki/extensions/WikiCategoryTagCloudmaster+3 K -347
mediawiki/extensions/Widgetsmaster+1 K -410
mediawiki/extensions/WikiArticleFeedsmaster+999 -407
mediawiki/extensions/VoteNYmaster+3 K -369
mediawiki/extensions/RandomImagemaster+995 -410
mediawiki/extensions/RandomImageByCategorymaster+995 -409
mediawiki/extensions/RandomInCategorymaster+995 -410
mediawiki/extensions/MarkAsHelpfulmaster+3 K -442
mediawiki/extensions/EmailCapturemaster+1 K -200
mediawiki/extensions/ApprovedRevsmaster+3 K -344
mediawiki/extensions/QuizGamemaster+1 K -1 K
mediawiki/extensions/ConfirmAccountmaster+740 -1 K
mediawiki/extensions/ShoutWikiAdsmaster+761 -1 K
mediawiki/extensions/LastModifiedmaster+871 -300
mediawiki/extensions/Git2Pagesmaster+872 -270
mediawiki/extensions/SemanticDrilldownmaster+956 -363
mediawiki/extensions/EmailAuthmaster+763 -1 K
mediawiki/extensions/MetaMastermaster+763 -1 K
mediawiki/extensions/ContributionScoresmaster+763 -1 K
mediawiki/extensions/InviteSignupmaster+761 -1 K
mediawiki/extensions/LanguageToolmaster+1 K -2 K
mediawiki/extensions/MaintenanceShellmaster+769 -1 K
mediawiki/extensions/NamespaceSidebarmaster+755 -1 K
mediawiki/extensions/Thememaster+765 -1 K
mediawiki/extensions/SpamDiffToolmaster+761 -1 K
mediawiki/extensions/SmiteSpammaster+778 -1 K
mediawiki/extensions/BreadCrumbsmaster+755 -1 K
mediawiki/extensions/TwitterLoginmaster+760 -1 K
mediawiki/extensions/VEForAllmaster+1 K -3 K
mediawiki/extensions/PhpTagsStoragemaster+994 -407
mediawiki/extensions/OnlineStatusmaster+1 K -472
mediawiki/extensions/Farmermaster+876 -1 K
mediawiki/extensions/Maintenancemaster+747 -1 K
mediawiki/extensions/ImportArticlesmaster+771 -1 K
mediawiki/extensions/OpenLayersmaster+747 -1 K
mediawiki/extensions/ImageTweaksmaster+1 K -2 K
mediawiki/extensions/EditUsermaster+745 -1 K
mediawiki/extensions/HTMLTagsmaster+1 K -200
mediawiki/extensions/PhpTagsmaster+995 -410
mediawiki/extensions/PhpHighlightmaster+995 -410
mediawiki/extensions/Insidermaster+837 -281
mediawiki/extensions/ShortUrlmaster+579 -296
mediawiki/extensions/PageBlockmaster+1 K -443
mediawiki/extensions/PrivateDomainsmaster+995 -410
mediawiki/extensions/PaginateTextmaster+1 K -216
mediawiki/extensions/PushToWatchmaster+816 -193
mediawiki/extensions/RandomPagesmaster+995 -409
mediawiki/extensions/RandomAreamaster+995 -409
mediawiki/extensions/PageLanguagemaster+995 -410
mediawiki/extensions/PageCreationNotifmaster+995 -410
mediawiki/extensions/BlogPagemaster+874 -270
mediawiki/extensions/BlueSpiceFoundationmaster+923 -299
mediawiki/extensions/BibManagermaster+859 -309
mediawiki/extensions/TweetANewmaster+841 -277
mediawiki/extensions/BiblioPlusmaster+889 -258
mediawiki/extensions/BaseHooksmaster+67 -315
mediawiki/extensions/CreateRedirectmaster+872 -297
mediawiki/extensions/Pollmaster+870 -285
mediawiki/extensions/HoverGallerymaster+3 K -254
mediawiki/extensions/GoogleAdSensemaster+894 -75
mediawiki/extensions/HoverGallerymaster+4 K -245
mediawiki/extensions/Calendarmaster+1 K -637
mediawiki/extensions/WebChatmaster+749 -1 K
mediawiki/extensions/ImageMetricsmaster+1 K -98
mediawiki/extensions/ArticleIndexmaster+4 K -401
mediawiki/skins/Amethystmaster+3 K -391
mediawiki/extensions/YouTubemaster+3 K -353
mediawiki/extensions/AnonPrivacymaster+3 K -317
mediawiki/extensions/PageFormsmaster+4 K -176
mediawiki/services/citoidmaster+8 -51
mediawiki/extensions/CollaborationKitmaster+158 -132
mediawiki/extensions/GoogleLoginmaster+61 -55
mediawiki/extensions/CollaborationKitmaster+17 -13
mediawiki/extensions/CleanChangesmaster+37 -64
mediawiki/extensions/SpamBlacklistmaster+26 -8
mediawiki/extensions/Buggymaster+61 -62
mediawiki/extensions/DismissableSiteNoticemaster+41 -51
Show related patches Customize query in gerrit

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Zoranzoki21 updated the task description. (Show Details)Feb 5 2020, 8:17 PM

Change 570183 merged by jenkins-bot:
[mediawiki/extensions/EmailCapture@master] build: Replace jshint/jsonlint with eslint

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

Zoranzoki21 updated the task description. (Show Details)Feb 5 2020, 8:19 PM
Zoranzoki21 updated the task description. (Show Details)Feb 5 2020, 8:23 PM
Zoranzoki21 added a subscriber: Paladox.

@Aklapper I don't know why Phabricator added Paladox as subscriber, I just added @Paladox in description for CollapsibleVector per this.

Uhh now Phabricator shows my comment as I added Paladox as a subscriber with it, no with editing task description.... Uhh...

Change 567466 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/MarkAsHelpful@master] build: Replace jshint/jsonlint with eslint, add stylelint

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

Zoranzoki21 updated the task description. (Show Details)Feb 5 2020, 11:17 PM

Change 567466 merged by jenkins-bot:
[mediawiki/extensions/MarkAsHelpful@master] build: Replace jshint/jsonlint with eslint, add stylelint

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

Zoranzoki21 updated the task description. (Show Details)Feb 5 2020, 11:37 PM
Zoranzoki21 updated the task description. (Show Details)Feb 6 2020, 2:33 AM
Zoranzoki21 updated the task description. (Show Details)
Zoranzoki21 updated the task description. (Show Details)Feb 6 2020, 2:36 AM

Change 570495 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/RandomInCategory@master] build: Replace jshint/jsonlint with eslint

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

Change 570496 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/RandomImageByCategory@master] build: Replace jshint/jsonlint with eslint

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

Change 570495 merged by jenkins-bot:
[mediawiki/extensions/RandomInCategory@master] build: Replace jshint/jsonlint with eslint

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

Change 570499 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/RandomImage@master] build: Replace jshint/jsonlint with eslint

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

Change 570496 merged by jenkins-bot:
[mediawiki/extensions/RandomImageByCategory@master] build: Replace jshint/jsonlint with eslint

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

Change 570499 merged by jenkins-bot:
[mediawiki/extensions/RandomImage@master] build: Replace jshint/jsonlint with eslint

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

Change 570502 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/RandomGameUnit@master] build: Replace jshint/jsonlint with eslint, add stylelint

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

Zoranzoki21 updated the task description. (Show Details)Feb 6 2020, 3:10 AM

Change 570508 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/VoteNY@master] build: Replace jshint/jsonlint with eslint, add stylelint

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

@Zoranzoki21: If you explicitly mention people, then you subscribe them. For general Phabricator questions unrelated to the topic of a task, please use https://www.mediawiki.org/wiki/Talk:Phabricator/Help - thanks! :)

Change 570508 merged by jenkins-bot:
[mediawiki/extensions/VoteNY@master] build: Replace jshint/jsonlint with eslint, add stylelint

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

Zoranzoki21 updated the task description. (Show Details)Feb 8 2020, 8:30 AM

Change 571010 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/HeaderTabs@master] build: Replace jshint/jsonlint with eslint, add stylelint

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

Zoranzoki21 updated the task description. (Show Details)Feb 9 2020, 7:27 PM

Change 571086 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/WikiCategoryTagCloud@master] build: Replace jshint/jsonlint with eslint, add stylelint

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

Change 571090 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/WikiArticleFeeds@master] build: Replace jshint/jsonlint with eslint

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

Change 571098 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/Widgets@master] build: Replace jshint/jsonlint with eslint

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

Change 571098 merged by jenkins-bot:
[mediawiki/extensions/Widgets@master] build: Replace jshint/jsonlint with eslint

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

Zoranzoki21 updated the task description. (Show Details)Feb 10 2020, 1:58 AM

Change 571086 merged by jenkins-bot:
[mediawiki/extensions/WikiCategoryTagCloud@master] build: Replace jshint/jsonlint with eslint, add stylelint

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

Change 570502 merged by Jforrester:
[mediawiki/extensions/RandomGameUnit@master] build: Replace jshint/jsonlint with eslint, add stylelint

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

Zoranzoki21 updated the task description. (Show Details)Feb 10 2020, 9:23 PM
Zoranzoki21 updated the task description. (Show Details)Feb 11 2020, 8:39 PM

Change 571010 merged by jenkins-bot:
[mediawiki/extensions/HeaderTabs@master] build: Replace jshint/jsonlint with eslint, add stylelint

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

Zoranzoki21 updated the task description. (Show Details)
Zoranzoki21 updated the task description. (Show Details)Feb 20 2020, 12:00 PM
Zoranzoki21 updated the task description. (Show Details)

Change 573561 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/Drafts@master] build: Replace jshint/jsonlint with eslint, add stylelint

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

Change 573561 merged by jenkins-bot:
[mediawiki/extensions/Drafts@master] build: Replace jshint/jsonlint with eslint, add stylelint

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

Zoranzoki21 updated the task description. (Show Details)Mar 8 2020, 10:26 AM
Zoranzoki21 updated the task description. (Show Details)

Change 577940 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/TimelineTable@master] build: Replace jshint/jsonlint with eslint, add stylelint

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

Change 577987 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/ThrottleOverride@master] build: Replace jshint/jsonlint with eslint

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

Change 577991 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/TimeMachine@master] build: Replace jshint/jsonlint with eslint

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

Change 577997 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/TitleIcon@master] build: Replace jshint/jsonlint with eslint

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

Change 578001 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/TitleKey@master] build: Replace jshint/jsonlint with eslint

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

Change 577991 merged by jenkins-bot:
[mediawiki/extensions/TimeMachine@master] build: Replace jshint/jsonlint with eslint

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

Zoranzoki21 updated the task description. (Show Details)Mar 9 2020, 3:49 AM
Zoranzoki21 updated the task description. (Show Details)

Change 578001 merged by jenkins-bot:
[mediawiki/extensions/TitleKey@master] build: Replace jshint/jsonlint with eslint

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

Change 577997 merged by jenkins-bot:
[mediawiki/extensions/TitleIcon@master] build: Replace jshint/jsonlint with eslint

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

Change 577940 merged by jenkins-bot:
[mediawiki/extensions/TimelineTable@master] build: Replace jshint/jsonlint with eslint, add stylelint

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

Change 577987 merged by jenkins-bot:
[mediawiki/extensions/ThrottleOverride@master] build: Replace jshint/jsonlint with eslint

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

Zoranzoki21 updated the task description. (Show Details)Mar 12 2020, 3:26 AM
Zoranzoki21 updated the task description. (Show Details)Mar 12 2020, 2:00 PM

Change 579273 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/Quantcast@master] build: Replace jshint/jsonlint with eslint

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

Change 579277 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/QuickSearchLookup@master] build: Replace jshint and jsonlint with eslint, add stylelint

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

Change 579285 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/EditSimilar@master] build: Replace jshint/jsonlint with eslint, add stylelint

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

Zoranzoki21 updated the task description. (Show Details)Mar 12 2020, 2:54 PM

Change 579285 merged by jenkins-bot:
[mediawiki/extensions/EditSimilar@master] build: Replace jshint/jsonlint with eslint, add stylelint

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

Change 579273 merged by jenkins-bot:
[mediawiki/extensions/Quantcast@master] build: Replace jshint/jsonlint with eslint

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

Change 579277 merged by jenkins-bot:
[mediawiki/extensions/QuickSearchLookup@master] build: Replace jshint and jsonlint with eslint, add stylelint

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

Zoranzoki21 updated the task description. (Show Details)Mar 12 2020, 4:54 PM

@Legoktm @Jdforrester-WMF Can we get new, fresh list?

ptrcnull removed a subscriber: ptrcnull.Mar 12 2020, 4:56 PM
Zoranzoki21 updated the task description. (Show Details)Mar 13 2020, 4:22 AM
Zoranzoki21 updated the task description. (Show Details)Mar 13 2020, 4:37 AM

Change 579466 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/ContributionsList@master] build: Replace jshint/jsonlint with eslint

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

Change 579466 merged by jenkins-bot:
[mediawiki/extensions/ContributionsList@master] build: Replace jshint/jsonlint with eslint

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

Zoranzoki21 updated the task description. (Show Details)Mar 29 2020, 2:21 PM

Change 584251 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/JSBreadCrumbs@master] build: Replace jshint/jsonlint with eslint, add stylelint

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

Zoranzoki21 updated the task description. (Show Details)Mar 29 2020, 10:01 PM
Zoranzoki21 updated the task description. (Show Details)Mar 30 2020, 12:33 PM

Change 584589 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/LanguageSelector@master] build: Replace jshint/jsonlint with eslint

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

Change 584591 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/JsonData@master] Drop jshint from Gruntfile.js and package.json

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

Change 584591 merged by jenkins-bot:
[mediawiki/extensions/JsonData@master] Drop jshint from Gruntfile.js and package.json

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

Change 587194 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/DeviceMapLogCapture@master] build: Replace jshint/jsonlint with eslint

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

Change 587196 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/DisableAccount@master] build: Replace jshint/jsonlint with eslint

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

Zoranzoki21 updated the task description. (Show Details)Apr 7 2020, 8:42 AM

Change 587204 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/OracleTextSearch@master] build: Replace jshint/jsonlint with eslint

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

Change 587215 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/OnlineStatusBar@master] build: Replace jshint/jsonlint with eslint, add stylelint

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

Zoranzoki21 updated the task description. (Show Details)Apr 7 2020, 9:35 AM

Change 587204 abandoned by Zoranzoki21:
build: Replace jshint/jsonlint with eslint

Reason:
Per T249656.

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

Change 587215 merged by jenkins-bot:
[mediawiki/extensions/OnlineStatusBar@master] build: Replace jshint/jsonlint with eslint, add stylelint

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

Change 587196 merged by jenkins-bot:
[mediawiki/extensions/DisableAccount@master] build: Replace jshint/jsonlint with eslint

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

Change 587194 merged by jenkins-bot:
[mediawiki/extensions/DeviceMapLogCapture@master] build: Replace jshint/jsonlint with eslint

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

Zoranzoki21 updated the task description. (Show Details)Apr 14 2020, 11:45 PM