Skip to content

Add prettier#67

Open
fathyb wants to merge 3 commits into
segmentio:masterfrom
fathyb:chore/add-prettier
Open

Add prettier#67
fathyb wants to merge 3 commits into
segmentio:masterfrom
fathyb:chore/add-prettier

Conversation

@fathyb
Copy link
Copy Markdown
Contributor

@fathyb fathyb commented Jun 20, 2018

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.

Demo


https://segment.atlassian.net/browse/LIB-413
cc @f2prateek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant