MediaWiki-specific linting rules, for use in MediaWiki core and extensions.
npm install eslint-plugin-mediawiki__If you are developing in MediaWiki you should be using eslint-config-wikimedia which includes this plugin.__
Add mediawiki to the plugins section of your .eslintrc configuration file, then enable the required rules.
``json`
{
"plugins": [
"mediawiki"
],
"rules": {
"mediawiki/msg-doc": "error"
}
}
There are two shared configs: vue which contains all Vue-related rules, and common which includes all other rules.
`json`
{
"plugins": [
"mediawiki"
],
"extends": [
"plugin:mediawiki/common"
],
"overrides": [
{
"files": [ "*/.vue" ],
"extends": [
"plugin:mediawiki/vue"
]
}
]
}
`sh``
npm install
npm test
Distributed under the MIT license. See LICENSE for details.