@hint/connector-jsdom
Version:
hint connector for JSDOM
60 lines (45 loc) • 1.4 kB
Markdown
A connector to use [jsdom][jsdom] in `webhint`.
This package is installed automatically when adding webhint to your project
so running the following is enough:
```bash
npm install hint --save-dev
```
To use it, activate it via the [`.hintrc`][hintrc] configuration file:
```json
{
"connector": {
"name": "jsdom"
},
...
}
```
The set of settings supported by jsdom connector are:
* `ignoreHTTPSError (boolean)`: Indicates if errors with certificates
should be ignored. Use this when checking self-signed certificates.
It is `false` by default.
* `waitFor (number)`: time in milliseconds the connector will wait after
the site is ready before starting the DOM traversing and stop listening
to any network request. By default, it will wait until the network is
somehow "quiet" even though more requests could be processed after DOM
traversing. Default is `5000`.
```json
{
"connector": {
"name": "jsdom",
"options": {
"ignoreHTTPSErrors": false,
"waitFor": 10000
}
},
...
}
```
* [Connectors overview][connectors]
<!-- Link labels: -->
[]: https://webhint.io/docs/user-guide/concepts/connectors/
[]: https://github.com/jsdom/jsdom
[]: https://webhint.io/docs/user-guide/configuring-webhint/summary/