w3c-html-validator 1.6.1 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +1 -1
- package/README.md +2 -2
- package/dist/w3c-html-validator.d.ts +1 -1
- package/dist/w3c-html-validator.js +4 -4
- package/package.json +7 -8
package/LICENSE.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2021-
|
|
3
|
+
Copyright (c) 2021-2024 Individual contributors to w3c-html-validator
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -78,7 +78,7 @@ Examples:
|
|
|
78
78
|
Uses a regex with "or" operators (`|`) to skip multiple HTML validation messages.
|
|
79
79
|
|
|
80
80
|
- `html-validator docs --ignore-config=spec/ignore-config.txt`<br>
|
|
81
|
-
Similar to the pervious command but strings and regexes are stored in a configuration file (see the
|
|
81
|
+
Similar to the pervious command but strings and regexes are stored in a configuration file (see the _Configuration File for Ignore Patterns_ section below).
|
|
82
82
|
|
|
83
83
|
- `html-validator --quiet`<br>
|
|
84
84
|
Suppresses all the "pass" status messages.
|
|
@@ -91,7 +91,7 @@ Examples:
|
|
|
91
91
|
|
|
92
92
|
_**Note:** Single quotes in commands are normalized so they work cross-platform and avoid the errors often encountered on Microsoft Windows._
|
|
93
93
|
|
|
94
|
-
### 5.
|
|
94
|
+
### 5. Configuration File for Ignore Patterns
|
|
95
95
|
The optional `--ignore-config=FILENAME` flag specifies a configuration file with one string or regex per line.
|
|
96
96
|
HTML validation messages containing any of the strings or matching any of the regexes will be skipped.
|
|
97
97
|
Empty lines and lines starting with a hash sign (`#`) are treated as comments and do nothing.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//! w3c-html-validator v1.6.
|
|
1
|
+
//! w3c-html-validator v1.6.3 ~~ https://github.com/center-key/w3c-html-validator ~~ MIT License
|
|
2
2
|
|
|
3
3
|
import chalk from 'chalk';
|
|
4
4
|
import fs from 'fs';
|
|
@@ -6,7 +6,7 @@ import log from 'fancy-log';
|
|
|
6
6
|
import request from 'superagent';
|
|
7
7
|
import slash from 'slash';
|
|
8
8
|
const w3cHtmlValidator = {
|
|
9
|
-
version: '1.6.
|
|
9
|
+
version: '1.6.3',
|
|
10
10
|
validate(options) {
|
|
11
11
|
const defaults = {
|
|
12
12
|
checkUrl: 'https://validator.w3.org/nu/',
|
|
@@ -65,8 +65,8 @@ const w3cHtmlValidator = {
|
|
|
65
65
|
const response = reason.response;
|
|
66
66
|
const getMsg = () => [response.status, response.res.statusMessage, response.request.url];
|
|
67
67
|
const message = response ? getMsg() : [reason.errno, reason.message];
|
|
68
|
-
|
|
69
|
-
return toValidatorResults(
|
|
68
|
+
response.body = { messages: [{ type: 'network-error', message: message.join(' ') }] };
|
|
69
|
+
return toValidatorResults(response);
|
|
70
70
|
};
|
|
71
71
|
return w3cRequest.then(filterMessages).then(toValidatorResults).catch(handleError);
|
|
72
72
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "w3c-html-validator",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.3",
|
|
4
4
|
"description": "Check the markup validity of HTML files using the W3C validator",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -91,21 +91,20 @@
|
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
93
|
"@types/fancy-log": "~2.0",
|
|
94
|
-
"@types/
|
|
95
|
-
"@types/
|
|
96
|
-
"@
|
|
97
|
-
"@typescript-eslint/
|
|
98
|
-
"@typescript-eslint/parser": "~6.10",
|
|
94
|
+
"@types/node": "~20.10",
|
|
95
|
+
"@types/superagent": "~8.1",
|
|
96
|
+
"@typescript-eslint/eslint-plugin": "~6.17",
|
|
97
|
+
"@typescript-eslint/parser": "~6.17",
|
|
99
98
|
"add-dist-header": "~1.3",
|
|
100
99
|
"assert-deep-strict-equal": "~1.1",
|
|
101
100
|
"copy-file-util": "~1.1",
|
|
102
101
|
"copy-folder-util": "~1.1",
|
|
103
|
-
"eslint": "~8.
|
|
102
|
+
"eslint": "~8.56",
|
|
104
103
|
"jshint": "~2.13",
|
|
105
104
|
"merge-stream": "~2.0",
|
|
106
105
|
"mocha": "~10.2",
|
|
107
106
|
"rimraf": "~5.0",
|
|
108
107
|
"run-scripts-util": "~1.2",
|
|
109
|
-
"typescript": "~5.
|
|
108
|
+
"typescript": "~5.3"
|
|
110
109
|
}
|
|
111
110
|
}
|