The following sniffs are failing and were disabled:
* MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPublic
* MediaWiki.Usage.ExtendClassUsage.FunctionConfigUsage
Additional changes:
* Dropped .inc files from .phpcs.xml (T200956).
* Added the `wikimedia/mediawiki` profile in .eslintrc.json (T262222).
* Added the `wikimedia/jquery` profile in .eslintrc.json (T262222).
* Removed global `$`, included in the `wikimedia/jquery` profile (T262222).
* Removed global `mw`, included via `wikimedia/mediawiki` profile (T262222).
* Dropped the emtpy global definition in .eslintrc.json.
Change-Id: Ib5a3697712078a4ed22195c274eae9c82ddd7227
This was internal to CategoryTree JS code and only needed on very
few pages. Export it as part of the module that needs it, instead.
Given this is computed and not a plain config var, use callback
to generate the value.
Bug: T219342
Change-Id: I790a98128b0a3317e27ac0d5fda08d48aeb640dc
* Add @inheritDoc to functions that are inheritance.
* Move comments to a single line.
Remove the phpcs rule exceptions:
* MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected
* MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic
* MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment
Change-Id: I742ee19f0a3d2d62e08b6f2e35cd9a6b3940cd22
This change adds the needed modules to the page in the same hook
that adds the category tree HTML.
This avoids loading the modules on skins without a sidebar, like
SkinApi, or on pages without categories.
A forced-loading of the modules from BeforePageDisplay hook is not
necessary anymore in those cases.
This change avoids getting the OutputPage object from the global $wgOut.
Bug: T212820
Change-Id: I2bd50c45aa201a06630af3d57c9bcfccf7b22b99
This change allows the skin to customize if there is a sidebar or not.
For example the SkinApi overloads buildSidebar and therefor the hook
SkinBuildSidebar is not triggered.
Change-Id: Ib39736901f25822d40265ccaa5fd0feea977cdc1
The hook `SkinJoinCategoryLinks` is not used and not triggered.
Also remove the style for the class CategoryTreeCategoryBarItem because
it is only used in skinJoinCategoryLinks::skinJoinCategoryLinks.
Change-Id: I52e4f819ff195fc1fa8a148b0bb58d95a4bf22d7
Register all hooks unconditionally in extension.json, and then in the
hook
itself, check whether they should be doing anything.
Change-Id: I5f0019fc444371a24a11a25ca2d980c0a9ab5a61
The following sniffs now pass and were enabled:
* MediaWiki.Commenting.LicenseComment.InvalidLicenseTag
Change-Id: I13c4825186d8ba101feb2a2d28ee8dc9bc7306dd
Not referenced anywhere in Wikimedia Git, except for the one
method that uses it, in the same class here.
Also:
* Set explicit 'public' visibility of getOptionsAsJsStructure().
* Avoid use of !is_null().
* Avoid assignment in ternary.
Change-Id: I71d2a247e001b7f7f4f52546e8167a79d873076e