Skip to content

Instantly share code, notes, and snippets.

@ken7253
Created February 25, 2022 15:16
Show Gist options
  • Save ken7253/fbf56cb557518d715bf3dbe2a5192e88 to your computer and use it in GitHub Desktop.
Save ken7253/fbf56cb557518d715bf3dbe2a5192e88 to your computer and use it in GitHub Desktop.
markuplint preset
{
"excludeFiles": ["**/node_modules/**/*"],
"rules": {
"attr-duplication": true,
"character-reference": true,
"class-naming": "/[a-z]+(__[a-z]+)?/",
"deprecated-attr": true,
"deprecated-element": true,
"disallowed-element": true,
"doctype": true,
"id-duplication": true,
"ineffective-attr": true,
"invalid-attr": {
"option": {
"attrs": {
"href": {
"pattern": "/^(https?://|/)/"
},
"src": {
"pattern": "/^(https?://|/)/"
}
}
}
},
"landmark-roles": true,
"no-refer-to-non-existent-id": true,
"permitted-contents": true,
"required-attr": true,
"required-element": true,
"wai-aria": true
},
"nodeRules": [
{
"tagName": "img",
"rules": {
"required-attr": ["width", "height", {
"name": "src",
"value": "/.(jpe?g|png|svg|webp)$/"
}]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment