Skip to content

mediawiki/msg-doc doesn't accept valid docs with 1 entry #57

Closed

Description

Image for: Description

The plugin blocks my patch with "All possible message keys should be documented". But I documented everything:

// The following messages are used here:
// * advancedsearch-sort-*
var msg = mw.message( 'advancedsearch-sort-' + name.replace( /_/g, '-' ) );

(from https://gerrit.wikimedia.org/r/c/mediawiki/extensions/AdvancedSearch/+/627230/6/modules/ui/ext.advancedSearch.SortPreference.js#15)

It appears like the plugin assumes a list with 1 entry must be wrong: https://github.com/wikimedia/eslint-plugin-mediawiki/blob/master/src/utils.js#L54. But this is the full list. There is nothing more to say at this point.

Adding something like * … just to silence the error doesn't work either: https://github.com/wikimedia/eslint-plugin-mediawiki/blob/master/src/utils.js#L13.

Can we please relax the plugin and make it accept a single list entry?

Metadata

Image for: Metadata

Metadata

Image for: Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Image for: Issue actions