diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7e19f27c3..94bec39e1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,6 +5,7 @@ guidelines: ## Indentation and whitespace +Your JavaScript code should pass [linting](https://github.com/alphagov/govuk_prototype_kit/blob/0d9835b7ad8d7bc06aa288204eb3ce9a07116be2/docs/linting.md). 2-space, soft-tabs only. No trailing whitespace. ## Versioning diff --git a/README.md b/README.md index fd47374c8..7416c284d 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,22 @@ Run the app Go to [localhost:3000](http://localhost:3000) in your browser. +## Linting + +### GOV.UK lint +[GOV.UK elements uses govuk-lint](https://github.com/alphagov/govuk-lint#sass), which uses [scss-lint](https://github.com/brigade/scss-lint) as its scss linter. + +### Standard JavaScript +GOV.UK elements uses [standardjs](http://standardjs.com/), an opinionated JavaScript linter. All JavaScript files follow its conventions. + +Both linters run on CI to ensure that new pull requests are in line with them. + +## Linting + +To check the whole codebase, run: + + npm test + ## Running Wraith to compare changes GOV.UK elements uses Wraith so that regressions can be easily spotted.