We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow.
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult GitHub Help for more information on using pull requests.
There is a make rule for linting. Requirements for it are included in the docker image.
source util/commands.sh
wptd_exec_it make lintTo run outside docker, you'll need to install golint and eslint.
Globally (in wpt.fyi root):
npm install -g eslint babel-eslint eslint-plugin-html
make testLocally (in webapp/ dir):
npm install
npm testThere is a number of make rule for testing. To run tests in docker:
source util/commands.sh
wptd_exec_it make testSee Makefile for more fine grained targets which take less time to run.
You should set up your repo to run make prepush in docker when you're pushing, to help catch trivial build/lint errors.
See the git hooks folder for instructions.
All source files (including .js, .go, .html, .css) must begin with a comment of the below header:
// Copyright {YEAR} The WPT Dashboard Project. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.