Commit d824a704 authored by Dan Allen's avatar Dan Allen

document the linter and formatter in the contributing guide

parent 8f649d92
......@@ -24,7 +24,6 @@
......@@ -317,6 +316,29 @@ You can read more about this feature in the
You can skip tests by appending `.skip` to the `describe` and/or `it` method calls (e.g., `describe.skip()`).
You can read more about this feature in the[mocha documentation].
=== Expectations for Writing Code
All JavaScript code in the project must adhere to the {uri-standardjs}[JavaScript Standard Style].
You can find a {uri-standardjs-rules}[list of rules] on the standard JS site.
As the name suggests, these rules are pretty standard.
To check that your code adheres to these rules, you simply need to run the test suite.
It's automatically configured to lint (i.e., check) your JavaScript code first.
If you want to run the linter separately, you can use the following gulp task:
$ gulp lint
There are also {uri-standardjs-ide}[text editor plugins] you can use, if that's what you prefer.
While the standard linter checks for syntax, it doesn't cover all the asthetics of a code style.
For that, we employ {uri-prettier}[prettier].
To run prettier to automatically format your code, run the following Yarn script:
$ yarn run format
The format command will modify your files, so be sure to commit your changes before running it so you can review and rollback if necessary.
=== Expectations For Writing Tests
If you need to add a new test to the suite, you can use [.path]_test/example-test.js_ as a reference.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment