CLI for validating html using validator.w3.org/nu
npm install html-validator-cli


CLI for validating html using validator.w3.org/nu
Requires Node >= 8.15.3 for older versions use v5.0.0
Sends ``Page is valid`to `STDOUT` and exits with code 0 if page is valid.
Sends `Page is not valid` to `STDOUT` and exits with code 1 if page is not valid.
Sends `Page not found` to `STDOUT` and exits with code 1 if page is not found.
``
$ npm i html-validator-cli -g
``
$ html-validator
With file
``
$ html-validator --file=
With data
``
$ html-validator --data=data
Optional pass in format for returned data.
Valid options: json, html, xhtml, xml, gnu and text (default).
``
$ html-validator
Optional pass in another validator.
It needs to expose the same REST interface.
``
$ html-validator
Optional pass in strings to ignore
``
$ html-validator
Optional pass in headers
``
$ html-validator
To get full result from validator use --verbose
``
$ html-validator
Optional, only get errors use --quiet
``
$ html-validator
Validate a local document without setting up a tunnel
``
$ html-validator
returns array of error messages
`JavaScript
[
{
"type": "error",
"lastLine": 8,
"lastColumn": 32,
"firstColumn": 27,
"message": "Stray end tag “div”.",
"extract": "aaaad code
- site-validator-cli CLI for validating a whole site or multiple pages
- html-validator API for this module