From eb970f1823847c545bf89241eec94745d8c52c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LUDWIG?= Date: Sun, 2 Jul 2023 13:07:45 +0200 Subject: [PATCH] BREAKING CHANGE: change default validator severities: "warning" and "error" --- README.md | 2 +- src/HTMLValidatorCommand.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 491dae9..0c56f17 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ npm install --save-dev html-w3c-validator start-server-and-test // You can also specify HTML files instead of URLs "files": ["./index.html", "./about.html"], - // Specify the severities of the validator (default: ["error"]) + // Specify the severities of the validator (default: ["warning", "error"]) "severities": ["info", "warning", "error"] } ``` diff --git a/src/HTMLValidatorCommand.ts b/src/HTMLValidatorCommand.ts index b6d690a..140128a 100644 --- a/src/HTMLValidatorCommand.ts +++ b/src/HTMLValidatorCommand.ts @@ -104,7 +104,10 @@ export class HTMLValidatorCommand extends Command { `Invalid config file at "${configPath}". Please add URLs or files.` ) } - const configSeverities: Severity[] = config.severities ?? ['error'] + const configSeverities: Severity[] = config.severities ?? [ + 'warning', + 'error' + ] for (const severity of configSeverities) { if (!severities.includes(severity)) { throw new Error(