mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
* The icon has been updated in https://bugzilla.mozilla.org/show_bug.cgi?id=1908920; * Add a linter to check that a svg element doesn't have fill="context-fill" attribute.
21 lines
458 B
JavaScript
21 lines
458 B
JavaScript
export default {
|
|
rules: {
|
|
valid: true,
|
|
|
|
custom: [
|
|
(reporter, $, ast, { filename }) => {
|
|
reporter.name = "no-svg-fill-context-fill";
|
|
|
|
const svg = $.find("svg");
|
|
const fill = svg.attr("fill");
|
|
if (fill === "context-fill") {
|
|
reporter.error(
|
|
"Fill attribute on svg element must not be set to 'context-fill'",
|
|
svg[0],
|
|
ast
|
|
);
|
|
}
|
|
},
|
|
],
|
|
},
|
|
};
|