Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Editor] Update the loading icon when wait for ML to take into account prefered-reduced-motion setting #18666

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .svglintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
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
);
}
},
],
},
};
28 changes: 25 additions & 3 deletions gulpfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1897,7 +1897,7 @@ gulp.task(

gulp.task("lint", function (done) {
console.log();
console.log("### Linting JS/CSS/JSON files");
console.log("### Linting JS/CSS/JSON/SVG files");

// Ensure that we lint the Firefox specific *.jsm files too.
const esLintOptions = [
Expand Down Expand Up @@ -1930,6 +1930,12 @@ gulp.task("lint", function (done) {
prettierOptions.push("--log-level", "warn", "--check");
}

const svgLintOptions = [
"node_modules/svglint/bin/cli.js",
"web/**/*.svg",
"--ci",
];

const esLintProcess = startNode(esLintOptions, { stdio: "inherit" });
esLintProcess.on("close", function (esLintCode) {
if (esLintCode !== 0) {
Expand All @@ -1950,8 +1956,24 @@ gulp.task("lint", function (done) {
done(new Error("Prettier failed."));
return;
}
console.log("files checked, no errors found");
done();

const svgLintProcess = startNode(svgLintOptions, {
stdio: "pipe",
});
svgLintProcess.stdout.setEncoding("utf8");
svgLintProcess.stdout.on("data", m => {
m = m.toString().replace(/-+ Summary -+.*/ms, "");
console.log(m);
});
svgLintProcess.on("close", function (svgLintCode) {
if (svgLintCode !== 0) {
done(new Error("svglint failed."));
return;
}

console.log("files checked, no errors found");
done();
});
});
});
});
Expand Down
Loading