Wikimedia shareable config for stylelint
npm install stylelint-config-wikimediaConfiguration rules to ensure your CSS is compliant with the Wikimedia CSS Coding Standards.
``console`
$ npm install -D stylelint-config-wikimedia
Set your stylelint config file, .stylelintrc.json, to:
`json`
{
"extends": "stylelint-config-wikimedia"
}
If you would also like to enable rules to disallow CSS which is unsupported by modern browsers Grade A) or basic supported browsers Grade C) browsers, you can use the following configurations instead:
`json`
{
"extends": "stylelint-config-wikimedia/support-modern"
}
`json`
{
"extends": "stylelint-config-wikimedia/support-basic"
}
If you are using in a MediaWiki environment, you can add the following config:
`json`
{
"extends": [
"stylelint-config-wikimedia",
"stylelint-config-wikimedia/mediawiki"
]
}
If you need to combine this with browser support rules:
`json`
{
"extends": [
"stylelint-config-wikimedia/support-modern",
"stylelint-config-wikimedia/mediawiki"
]
}
object to your config file, and add your overrides or additional rules there, for example:
`json
{
"extends": "stylelint-config-wikimedia/support-basic",
"rules": {
"@stylistic/max-empty-lines": null
}
}
``