From 1c5d93cf2d6de683f56ab9a6243c0da0edcfabd1 Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Fri, 30 Aug 2024 19:18:36 +0200 Subject: [PATCH] Update svglint to 3.1.0 The new release contains: - https://github.com/simple-icons/svglint/pull/110 - https://github.com/simple-icons/svglint/pull/111 which allow us to slightly simplify our code. --- .svglintrc.js | 14 ++++++++++++++ gulpfile.mjs | 10 +++------- package-lock.json | 9 +++++---- package.json | 2 +- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/.svglintrc.js b/.svglintrc.js index 25dad02764f52..68cf2ce57b64e 100644 --- a/.svglintrc.js +++ b/.svglintrc.js @@ -18,4 +18,18 @@ export default { }, ], }, + ignore: [ + "build/**", + "l10n/**", + "docs/**", + "node_modules/**", + "external/bcmaps/**", + "external/builder/fixtures/**", + "external/builder/fixtures_babel/**", + "external/quickjs/**", + "test/tmp/**", + "test/pdfs/**", + "web/locale/**", + "*~/**", + ], }; diff --git a/gulpfile.mjs b/gulpfile.mjs index e1fe53f32fe89..703053f536726 100644 --- a/gulpfile.mjs +++ b/gulpfile.mjs @@ -1983,8 +1983,9 @@ gulp.task("lint", function (done) { const svgLintOptions = [ "node_modules/svglint/bin/cli.js", - "web/**/*.svg", + "**/*.svg", "--ci", + "--no-summary", ]; const esLintProcess = startNode(esLintOptions, { stdio: "inherit" }); @@ -2009,12 +2010,7 @@ gulp.task("lint", function (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); + stdio: "inherit", }); svgLintProcess.on("close", function (svgLintCode) { if (svgLintCode !== 0) { diff --git a/package-lock.json b/package-lock.json index 4e35511e9410b..ad6e48ec01a28 100644 --- a/package-lock.json +++ b/package-lock.json @@ -53,7 +53,7 @@ "puppeteer": "23.3.1", "stylelint": "^16.10.0", "stylelint-prettier": "^5.0.2", - "svglint": "^3.0.0", + "svglint": "^3.1.0", "terser-webpack-plugin": "^5.3.10", "tsc-alias": "^1.8.10", "ttest": "^4.0.0", @@ -12521,10 +12521,11 @@ "dev": true }, "node_modules/svglint": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/svglint/-/svglint-3.0.0.tgz", - "integrity": "sha512-WX1gta0wz0dH35J5Dq3CP4Mz2jrrxrSqmEyehtraZaw4L4KRKAcTADaHxmj4Z+qYB6DP3IbDnaKNaQDFrpvVvA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/svglint/-/svglint-3.1.0.tgz", + "integrity": "sha512-5poEBAiB1VpswI2YLS2tx50/KfbcYc3AWWjsXBQJxcl6nkx632+LvN3biopFJbPGU1qrSnPQ22Iq42pFzbvBZw==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1", "chalk": "^5.0.0", diff --git a/package.json b/package.json index ffc8e398d3240..1478dbc10ffc0 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "puppeteer": "23.3.1", "stylelint": "^16.10.0", "stylelint-prettier": "^5.0.2", - "svglint": "^3.0.0", + "svglint": "^3.1.0", "terser-webpack-plugin": "^5.3.10", "tsc-alias": "^1.8.10", "ttest": "^4.0.0",