Our eslintrc file extends "wikimedia/client" which already includes all
of the previously listed jsdoc rules [1]. Therefore, we were clobbering
this much more thorough list.
This commit removes this clobbering and enables a much more extensive
list of jsdoc rules. Additionally, downloadPageActions was made to
conform to the rules.
[1] 07320f16ae/common.json (L99-L137)
Bug: T239269
Change-Id: I19c09054ba0bf2746ac78befc1b44426352113ec
The MobileFrontend dependency in Minerva is problematic.
Code that Minerva needs should live in core.
MobileFrontend should load code on all skins when they operate on
a mobile domain.
This eslint check reminds developers of this in a hope it encourages
more upstreaming to core when possible.
Of course disabling is also an option, but this check will at least
make us aware of when we are moving further away from the goal.
Change-Id: I62183c9aefc81053e4ad81fb746decef2dd24b44
Help with readability by using module.exports and require rather than the MobileFrontend
provided mw.mobileFrontend module manager (and avoid adopting webpack at this time)
Replace usages of mw.mobileFrontend.require with local require and module.exports
(compatible with RL or Node implementation)
Changes:
* Notifications modules are merged into skins.minerva.scripts and initialised
via a client side check.
* new file overlayManager for exporting an overlayManager singleton
rather than being hidden inside resources/skins.minerva.scripts/init.js
* All M.define/M.requires swapped out for require where possible
The `define` method is now forbidden in the repo.
Bug: T212944
Change-Id: I44790dd3fc6fe42bb502d79c39c4081c223bf2b1
I want to remove the need for M.define in the Minerva repository.
It's no longer necessary with packageFiles and will help tame
a lot of the code we have here!
Change-Id: If6a35a23e84a44adb965fd9c41265ba37eb8368e
* Add inline exceptions for global selectors
* Exception for $.animate in scrolling code
* Fix $ prefixing in search.js
* Fix repeated selectors in search.js & toc.js
* Disable no-parse-html-literal in tests
Change-Id: Id58fe11d1e09714501a378e4ca7ed9588f02f32d
The project ESLint configuration unintentionally inherited unwanted
configuration from MediaWiki, which allows global jQuery usage. Cap the
project's ESLint hierarchy at the project root.
Change-Id: Iceda39a4eeb492446b952f597af0f153cf345206
This exposes two broken tests:
* #setCount (Eastern Arabic numerals)
* clicking on the product of createBanner() should trigger a custom event
that were previously passing due to buggy assertions.
Change-Id: If18ad1ff9363fff65d3e347c01ce4bc0669b2a0e