Update stylelint to 13.10.0
DISABLE_THIRD_PARTY_CHECK=NPM update
R=jacktfranklin@chromium.org
Bug: none
Change-Id: I41b7006f336b9465677cc7434abd70a732c58221
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692907
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
diff --git a/node_modules/stylelint/lib/getPostcssResult.js b/node_modules/stylelint/lib/getPostcssResult.js
index a38476b..603cb73 100644
--- a/node_modules/stylelint/lib/getPostcssResult.js
+++ b/node_modules/stylelint/lib/getPostcssResult.js
@@ -85,7 +85,6 @@
if (options.codeProcessors && options.codeProcessors.length) {
if (stylelint._options.fix) {
- // eslint-disable-next-line no-console
console.warn(
'Autofix is incompatible with processors and will be disabled. Are you sure you need a processor?',
);
@@ -120,7 +119,7 @@
if (typeof customSyntax === 'string') {
try {
resolved = require(customSyntax);
- } catch (error) {
+ } catch {
throw new Error(
`Cannot resolve custom syntax module ${customSyntax}. Check that module ${customSyntax} is available and spelled correctly.`,
);
@@ -144,7 +143,7 @@
if (typeof customSyntax.parse === 'function') {
resolved = { ...customSyntax };
} else {
- throw new Error(
+ throw new TypeError(
`An object provided to the "customSyntax" option must have a "parse" property. Ensure the "parse" property exists and its value is a function.`,
);
}