Page MenuHomePhabricator

Refactor our javascript to remove jquery usage with better vanilla alternatives
Closed, ResolvedPublic5 Story Points

Description

When we updated the upstream wikimedia eslint config in T209932, we deactivated a lot of rules primarily concerning suboptimal jQuery usage, because that was beyond the scope of that ticket. Nonetheless, these rules are reasonable (#106 on GitHub) and should be implemented. Also the max-statements-per-line rule should be enabled and the code adjusted.

Acceptance Criteria

  • enable rules and fix code in Wikibase (~119 linting errors) - rules disabled
  • enable rules and fix code in WikibaseLexeme (~9 linting errors) - rules disabled
  • enable rules and fix code in WikibaseQualityConstrains (~0 linting errors)

Event Timeline

Michael created this task.Nov 29 2018, 4:08 PM
Restricted Application added a project: Wikidata. · View Herald TranscriptNov 29 2018, 4:08 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Addshore triaged this task as Low priority.Dec 18 2018, 11:12 AM
Addshore moved this task from Incoming to Ready to estimate on the Wikidata-Campsite board.
Addshore moved this task from incoming to consider for next sprint on the Wikidata board.
Addshore updated the task description. (Show Details)Dec 18 2018, 2:27 PM
Addshore set the point value for this task to 5.
Michael claimed this task.Dec 20 2018, 11:51 AM
Michael moved this task from 🗃️ Incoming to ⏳ In progress on the User-Michael board.

Change 480968 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/Wikibase@master] Enable and fix "no jQuery proxy" eslint rule

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

Change 480969 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/Wikibase@master] Enable and fix "no jQuery isFunction" eslint rule

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

Change 480970 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/Wikibase@master] Enable and fix "no jQuery grep" eslint rule

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

Change 480971 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/Wikibase@master] Enable and fix "no jQuery each" eslint rule

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

Change 480972 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/Wikibase@master] Enable and fix "no jQuery map" eslint rule

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

Change 480973 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/Wikibase@master] Fix broken unregister widget method

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

Change 480974 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/Wikibase@master] Enable and fix "no jQuery inArray" eslint rule

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

Change 480975 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/Wikibase@master] Enable and fix "no jQuery trim" eslint rule

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

Change 480976 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/Wikibase@master] Renable and fix max-statements-per-line eslint rule

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

Change 480983 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/WikibaseLexeme@master] Enable and fix "no jQuery proxy" eslint rule

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

Change 480984 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/WikibaseLexeme@master] Enable and fix "no jQuery each" eslint rule

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

Change 480985 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/WikibaseLexeme@master] Enable and fix "no jQuery inArray" eslint rule

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

Change 480986 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/WikibaseLexeme@master] Renable and fix max-statements-per-line eslint rule

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

Change 480987 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/WikibaseLexeme@master] Suppress compatibility errors only in tests

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

Change 480983 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Enable and fix "no jQuery proxy" eslint rule

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

Change 480968 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Enable and fix "no jQuery proxy" eslint rule

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

Change 480969 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Enable and fix "no jQuery isFunction" eslint rule

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

Change 480970 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Enable and fix "no jQuery grep" eslint rule

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

Change 480984 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Enable and fix "no jQuery each" eslint rule

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

Change 480985 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Enable and fix "no jQuery inArray" eslint rule

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

Change 480986 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Renable and fix max-statements-per-line eslint rule

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

Change 480987 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Suppress compatibility errors only in tests

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

Change 480971 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Enable and fix "no jQuery each" eslint rule

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

Change 480972 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Enable and fix "no jQuery map" eslint rule

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

Change 480973 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Fix broken unregister widget method

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

Change 480974 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Enable and fix "no jQuery inArray" eslint rule

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

Change 480975 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Enable and fix "no jQuery trim" eslint rule

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

Change 480976 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Renable and fix max-statements-per-line eslint rule

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