Page MenuHomePhabricator

[Spike] Work out how to resolve `Syntax error in namepath: ~'wikipage.indicators' ` eslint warning
Open, MediumPublic

Description

Our eslint rules warn against usage of ~'

The tilda seems to be permitted by https://jsdoc.app/about-namepaths and the ' character helps us work around "." being misinterpreted as referring to a namespace.

This is used mostly to document hooks:
https://doc.wikimedia.org/mediawiki-core/master/js/Hooks.html

When changing from

* @event ~'wikipage.categories'
* @memberof Hooks

to

* @event ~wikipage.categories
* @memberof Hooks

the hook documentation disappears from the hooks page

We should our explore our options here

  1. Disable the lint rule
  2. Adapt jsdoc theme so that we can remove the quotes
  3. Document without the "." and correct this in the theme.
* @event ~wikipage_categories
* @memberof Hooks
  1. Other?

Event Timeline

Jdlrobson triaged this task as Medium priority.Feb 1 2024, 10:42 PM
apaskulin subscribed.

Removing this from the scope of the MediaWiki core migration as we wrap up that project. We'll track this along with other docs improvements as part of MediaWiki-Documentation