mirror of
https://github.com/theoludwig/html-w3c-validator.git
synced 2024-12-08 00:45:37 +01:00
BREAKING CHANGE: change default validator severities: "warning" and "error"
This commit is contained in:
parent
29203985e4
commit
eb970f1823
@ -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"]
|
||||
}
|
||||
```
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user