w3c-html-validator 1.0.3 → 1.0.4
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/README.md
CHANGED
|
@@ -42,7 +42,7 @@ $ node examples.js
|
|
|
42
42
|
width=800 alt=screenshot>
|
|
43
43
|
|
|
44
44
|
## 3) Options
|
|
45
|
-
### validate()
|
|
45
|
+
### w3cHtmlValidator.validate(options)
|
|
46
46
|
| Name (key) | Type | Default | Description |
|
|
47
47
|
| :--------------- | :---------------------- | :------------------------------- | :------------------------------------------------------------------- |
|
|
48
48
|
| `html` | **string** | `null` | HTML string to validate. |
|
|
@@ -56,7 +56,7 @@ width=800 alt=screenshot>
|
|
|
56
56
|
*The `ignoreMessages` and `ignoreLevel` options only work for `'json'` output.
|
|
57
57
|
Option value `'warning'` also skips `'info'`.
|
|
58
58
|
|
|
59
|
-
### reporter()
|
|
59
|
+
### w3cHtmlValidator.reporter(options)
|
|
60
60
|
| Name (key) | Type | Default | Description |
|
|
61
61
|
| :-------------- | :--------- | :------ | :------------------------------------------------------------- |
|
|
62
62
|
| `maxMessageLen` | **number** | `null` | Trim validation messages to not exceed a maximum length. |
|
|
@@ -119,6 +119,10 @@ or as an npm script in **package.json**:
|
|
|
119
119
|
Passing no parameters defaults to validating all HTML files in the projects (skipping the
|
|
120
120
|
**node_modules** folder).
|
|
121
121
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
<br>
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
Feel free to submit questions at:<br>
|
|
126
|
+
[github.com/center-key/w3c-html-validator/issues](https://github.com/center-key/w3c-html-validator/issues)
|
|
127
|
+
|
|
128
|
+
[MIT License](LICENSE.txt)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//! w3c-html-validator v1.0.
|
|
1
|
+
//! w3c-html-validator v1.0.4 ~~ https://github.com/center-key/w3c-html-validator ~~ MIT License
|
|
2
2
|
|
|
3
3
|
export declare type ValidatorOptions = {
|
|
4
4
|
html?: string;
|
|
@@ -42,6 +42,6 @@ export declare type ReporterOptions = {
|
|
|
42
42
|
declare const w3cHtmlValidator: {
|
|
43
43
|
version: string;
|
|
44
44
|
validate(options: ValidatorOptions): Promise<ValidatorResults>;
|
|
45
|
-
reporter(results: ValidatorResults, options?: ReporterOptions
|
|
45
|
+
reporter(results: ValidatorResults, options?: ReporterOptions): ValidatorResults;
|
|
46
46
|
};
|
|
47
47
|
export { w3cHtmlValidator };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
//! w3c-html-validator v1.0.
|
|
1
|
+
//! w3c-html-validator v1.0.4 ~~ https://github.com/center-key/w3c-html-validator ~~ MIT License
|
|
2
2
|
|
|
3
3
|
import { readFileSync } from 'fs';
|
|
4
4
|
import chalk from 'chalk';
|
|
5
5
|
import log from 'fancy-log';
|
|
6
6
|
import request from 'superagent';
|
|
7
7
|
const w3cHtmlValidator = {
|
|
8
|
-
version: '1.0.
|
|
8
|
+
version: '1.0.4',
|
|
9
9
|
validate(options) {
|
|
10
10
|
const defaults = {
|
|
11
11
|
checkUrl: 'https://validator.w3.org/nu/',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//! w3c-html-validator v1.0.
|
|
1
|
+
//! w3c-html-validator v1.0.4 ~~ https://github.com/center-key/w3c-html-validator ~~ MIT License
|
|
2
2
|
|
|
3
3
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -20,7 +20,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
20
20
|
const fancy_log_1 = __importDefault(require("fancy-log"));
|
|
21
21
|
const superagent_1 = __importDefault(require("superagent"));
|
|
22
22
|
const w3cHtmlValidator = {
|
|
23
|
-
version: '1.0.
|
|
23
|
+
version: '1.0.4',
|
|
24
24
|
validate(options) {
|
|
25
25
|
const defaults = {
|
|
26
26
|
checkUrl: 'https://validator.w3.org/nu/',
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "w3c-html-validator",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "A package for testing HTML files or URLs against the W3C validator (written in TypeScript)",
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"description": "A package for testing HTML files or URLs against the W3C validator (written in functional TypeScript)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"module": "dist/w3c-html-validator.js",
|
|
@@ -75,25 +75,25 @@
|
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"chalk": "~5.0",
|
|
77
77
|
"fancy-log": "~2.0",
|
|
78
|
-
"glob": "~
|
|
79
|
-
"superagent": "~
|
|
78
|
+
"glob": "~8.0",
|
|
79
|
+
"superagent": "~8.0"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@types/fancy-log": "~
|
|
82
|
+
"@types/fancy-log": "~2.0",
|
|
83
83
|
"@types/glob": "~7.2",
|
|
84
|
-
"@types/node": "~
|
|
84
|
+
"@types/node": "~18.0",
|
|
85
85
|
"@types/superagent": "~4.1",
|
|
86
|
-
"@typescript-eslint/eslint-plugin": "~5.
|
|
87
|
-
"@typescript-eslint/parser": "~5.
|
|
86
|
+
"@typescript-eslint/eslint-plugin": "~5.30",
|
|
87
|
+
"@typescript-eslint/parser": "~5.30",
|
|
88
88
|
"add-dist-header": "~0.1",
|
|
89
89
|
"assert-deep-strict-equal": "~1.0",
|
|
90
90
|
"cpy-cli": "~4.1",
|
|
91
|
-
"eslint": "~8.
|
|
91
|
+
"eslint": "~8.19",
|
|
92
92
|
"jshint": "~2.13",
|
|
93
93
|
"merge-stream": "~2.0",
|
|
94
|
-
"mocha": "~
|
|
95
|
-
"npm-run-all2": "~
|
|
94
|
+
"mocha": "~10.0",
|
|
95
|
+
"npm-run-all2": "~6.0",
|
|
96
96
|
"rimraf": "~3.0",
|
|
97
|
-
"typescript": "~4.
|
|
97
|
+
"typescript": "~4.7"
|
|
98
98
|
}
|
|
99
99
|
}
|