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

Development environment

Development environment

This is a step-by-step guide to setting up a local development environment that will let you contribute back to the project.

  1. Install Node.js and yarn
  2. Fork and checkout your own webhint repository
  3. Add the upstream source
  4. Run the tests

Step 1: Install Node.js and yarn

Go to to download and install the latest stable version of Node.js for your operating system.

Go to to download and install the latest stable version of yarn for your operating system. webhint uses yarn’s workspaces feature to maintain several packages in the same GitHub repo.

Step 2: Fork and checkout your own webhint repository

Go to and click the Fork button. Follow the GitHub documentation for forking and cloning.

Once you’ve cloned the repository:

git clone

go into the project’s directory:

cd hint

and run yarn to get all the necessary dependencies:


You must be connected to the Internet for this step to work. You’ll see a lot of utilities being downloaded.

Step 3: Add the upstream source

The upstream source is the main webhint repository that active development happens on. While you won’t have push access to upstream, you will have pull access, allowing you to pull in the latest code whenever you want.

To add the upstream source for webhint, run the following in your repository:

git remote add upstream

Now, the remote upstream points to the upstream source.

Step 4: Run the tests

Running the tests is the best way to ensure you have correctly set up your development environment. Make sure you’re in the webhint directory, and then run:

yarn test

The testing takes a a bit to complete. If any tests fail, that likely means one or more parts of the environment setup didn’t complete correctly. The upstream tests always pass.

Built-in scripts

There are different scripts in all the package.json (root and package ones). The following is the list of all the available ones:

avaShortcut to the ava binary. Useful if you want to test one file and/or skip some of the steps of the test taskeverywhere
buildThis will build the current package or all the packages from scratcheverywhere
build:hintThis builds the main webhint packageroot
build:assetsCopies the static files to the dist folderpackage
build:tsCompiles the TypeScript files and outputs to the dist folderpackage
cleanCleans the output of all the packages or the current oneeverywhere
lintLints all the markdown and TypeScript fileseverywhere
lint:jsLints TypeScript files using eslinteverywhere
lint:mdLints markdown files using markdownlinteverywhere
new:hintStarts the wizard to create a new hint under /packages/root
releasePublishes the package in npm after running the tests and validate everything is finepackage
webhintRuns webhint from packages/hintpackage (hint)
testBuilds the package or the most recent modified packages and runs the tests with code coverageeverywhere
test-allBuilds the whole project and run the tests of all the packagesroot
watchLaunches all the other watch tasks in parallel, useful when developingpackage
watch:resourcesCopies all the static assets to dist and any new ones addedpackage
watch:testRuns the tests as soon as there is a test in the tests or in the code to testpackage
watch:tsCompiles the TypeScript files as soon as there is a changepackage