This site uses cookies for analytics. By continuing to browse this site, you agree to this use.
A JS Foundation Project

JSDOM connector

JSDOM connector (@hint/connector-jsdom)

A connector to use jsdom in webhint.

Installation

First, you need to install webhint:

npm install hint

Then, install the new connector:

npm install @hint/connector-jsdom

Known issues

  • It will not send the events for:

    • element::#document
    • element::#comment

Usage

Configure the connector name in your .hintrc configuration file:

{
"connector": {
"name": "jsdom"
},
...
}

jsdom configuration

jsdom allows you to configure the following:

  • headers: the headers used to fetch the resources. By default they are:
 {
"Accept-Language": "en-US,en;q=0.8,es;q=0.6,fr;q=0.4",
"Cache-Control": "no-cache",
"DNT": 1,
"Pragma": "no-cache",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
}

Further Reading