Skip to content

MediaWiki-specific linting rules, for use in MediaWiki core and extensions.

License

Notifications You must be signed in to change notification settings

wikimedia/eslint-plugin-mediawiki

Repository files navigation

eslint-plugin-mediawiki

MediaWiki-specific linting rules, for use in MediaWiki core and extensions.

Usage

If you are developing in MediaWiki you should be usingeslint-config-wikimediawhich includes this plugin.

Addmediawikito the plugins section of your.eslintrcconfiguration file, then enable the required rules.

{
"plugins":[
"mediawiki"
],
"rules":{
"mediawiki/msg-doc":"error"
}
}

There are two shared configs:vuewhich contains all Vue-related rules, andcommonwhich includes all other rules.

{
"plugins":[
"mediawiki"
],
"extends":[
"plugin:mediawiki/common"
],
"overrides":[
{
"files":["**/*.vue"],
"extends":[
"plugin:mediawiki/vue"
]
}
]
}

Rules

Development

npm install
npmtest

License

Distributed under the MIT license. See LICENSE for details.