Skip to content

Commit

Permalink
Add a section to the readme on linting
Browse files Browse the repository at this point in the history
- Update contributing.md
- Add section on linting, include details of GOV.UK lint and Standard
JS.
  • Loading branch information
gemmaleigh committed Aug 22, 2016
1 parent 8732eac commit dcf7635
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit dcf7635

Please sign in to comment.