Page MenuHomePhabricator

Refactor our javascript to remove jquery usage with better vanilla alternatives
Closed, ResolvedPublic5 Estimated 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

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
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.

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