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

Added code for prettier #40

Merged
merged 2 commits into from
Jan 6, 2022
Merged

Added code for prettier #40

merged 2 commits into from
Jan 6, 2022

Conversation

kstetsyuk
Copy link
Collaborator

No description provided.

@kstetsyuk kstetsyuk linked an issue Dec 28, 2021 that may be closed by this pull request
package.json Outdated
"husky": "^7.0.0"
"husky": "^7.0.4"
},
"husky": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this way of doing the pre-commit hooks with husky has been deprecated as of version 7. I couldn't get it to run the prettier command. From the docs, I found that you need to add to that .husky/pre-commit bash script instead. So I tested adding npx --no-install lint-staged to the end of the file and it worked like a charm. So you can probably remove this "husky" section from the package.json file

Copy link
Collaborator

@j-tafoya j-tafoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try adding that line to the .husky/pre-commit bash script and see if it works

@j-tafoya j-tafoya merged commit 110b22a into develop Jan 6, 2022
@j-tafoya j-tafoya deleted the feature/35-add-prettier branch January 6, 2022 18:25
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.

Add linting to husky pre-commit
2 participants