Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre-commit hook to run prettier on staged files #18

Merged
merged 1 commit into from
Jun 18, 2018

Conversation

brunolm
Copy link
Owner

@brunolm brunolm commented Jun 18, 2018

npm i -D lint-staged husky@^1.0.0-rc.9 prettier

Note: md files doesn't work, remove from the config #19
Note: you need to run git add after prettier f93796a

  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  "lint-staged": {
    "*.{ts,tsx}": [
      "prettier --write",
      "git add"
    ]
  },

```
npm i -D lint-staged husky@^1.0.0-rc.9 prettier
```
@coveralls
Copy link

Coverage Status

Coverage remained the same at 82.278% when pulling 86059a6 on feature/pre-commit-prettier into 7dc2a82 on master.

@brunolm brunolm merged commit 33d0228 into master Jun 18, 2018
@brunolm brunolm deleted the feature/pre-commit-prettier branch June 18, 2018 23:35
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.

2 participants