mirror of
https://github.com/simple-icons/simple-icons.git
synced 2024-11-16 00:59:07 +02:00
1c0b2b1dbf
* Update SVG linting. Only single path SVGs allowed. * Update docs.
30 lines
903 B
JavaScript
30 lines
903 B
JavaScript
module.exports = {
|
|
rules: {
|
|
elm: {
|
|
"svg": 1,
|
|
"svg > title": 1,
|
|
"svg > path": 1,
|
|
"*": false,
|
|
},
|
|
attr: [
|
|
{ // ensure that the SVG elm has the appropriate attrs
|
|
"role": "img",
|
|
"viewBox": "0 0 24 24",
|
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
|
|
"rule::selector": "svg",
|
|
"rule::whitelist": true,
|
|
},
|
|
{ // ensure that the title elm has the appropriate attr
|
|
"rule::selector": "svg > title",
|
|
"rule::whitelist": true,
|
|
},
|
|
{ // ensure that the path element only has the 'd' attr (no style, opacity, etc.)
|
|
"d": /^[,a-zA-Z0-9\. -]+$/,
|
|
"rule::selector": "svg > path",
|
|
"rule::whitelist": true,
|
|
}
|
|
]
|
|
}
|
|
};
|