Unverified Commit f0f64465 authored by Robert Knight's avatar Robert Knight Committed by GitHub

Merge pull request #936 from hypothesis/eslint-prettier-docs

Update Code Style docs to mention ESLint and Prettier
parents a1c2b014 fbec5307
......@@ -144,18 +144,20 @@ Code Style
JavaScript
##########
Hypothesis uses ESLint to help maintain style consistency. You can check your
changes for conformance using:
Hypothesis uses ESLint_ (a linter) and Prettier_ (an automated code formatter)
to ensure style consistency and help prevent common mistakes. Plugins are
available for most editors for these tools. We recommend that you set these up
before making changes to the code.
To auto-format code and run lint checks locally using the CLI, run:
.. code-block:: sh
make format
make lint
Many lint errors can be fixed automatically using:
.. code-block:: sh
./node_modules/.bin/eslint --fix
.. _ESLint: https://eslint.org
.. _Prettier: https://prettier.io
CSS
###
......
......@@ -147,7 +147,7 @@
"deps": "check-dependencies",
"lint": "eslint .",
"checkformatting": "prettier --check 'src/**/*.js'",
"format": "prettier --write 'src/**/*.js'",
"format": "prettier --list-different --write 'src/**/*.js'",
"test": "gulp test",
"report-coverage": "codecov -f coverage/coverage-final.json",
"version": "make clean build/manifest.json",
......
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