* Update stylelint-config-wikimedia to 0.13.0
* Ensure eslintrc.js and root files are linted
with server config
Change-Id: I59c49fedd5b0c4c5620f960b78e4f781a6bc5abb
Our eslintrc extends from 'wikimedia/client' which includes a
'no-restricted-properties' ruleset from the 'not-es5.js' file [1].
However, we were also including our own 'no-restricted-properties'
rules.
ESLint handle this duplication by clobbering instead of merging
so eslint-config-wikimedia's no-restricted-properties where not taking
effect and we were losing out on some guards against using es6.
This commit corrects that and makes both no-restricted-properties
rulesets merge instead of clobber as already done in MobileFrontend [2]
[1] 07320f16ae/language/not-es5.js (L5)
[2] https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/.eslintshared.js
Bug: T239269
Change-Id: Ibc2c144be51719d71a4c1d5828486253a5d4bf5d
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