Rebased on #39, please merge it before this one.
Same as segmentio/analytics.js-core#89
This PR adds prettier-eslint, which is just prettier with its output piped to eslint --fix. js files are formatted using eslint rules, while md and json files only using prettier.
husky is added to setup a Git precommit hook, and lint-staged to only check staged files. This will make sure every commit is properly formatted and passes the lint test. This can be bypassed by using the Git commit--no-verify option.
A format script is added to run prettier on all files.
Rebased on #39, please merge it before this one. Same as segmentio/analytics.js-core#89
This PR adds
prettier-eslint
, which is justprettier
with its output piped toeslint --fix
.js
files are formatted usingeslint
rules, whilemd
andjson
files only usingprettier
.husky
is added to setup a Gitprecommit
hook, andlint-staged
to only check staged files. This will make sure every commit is properly formatted and passes the lint test. This can be bypassed by using the Gitcommit
--no-verify
option.A
format
script is added to runprettier
on all files.https://segment.atlassian.net/browse/LIB-413 cc @f2prateek