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

Modified js file to check if Prettier works. #543

Open
KineOnes opened this issue Nov 1, 2024 · 0 comments
Open

Modified js file to check if Prettier works. #543

KineOnes opened this issue Nov 1, 2024 · 0 comments

Comments

@KineOnes
Copy link

KineOnes commented Nov 1, 2024

Error:
✔ Preparing lint-staged...
✔ Running tasks for staged files...
✖ Prevented an empty git commit!
✔ Reverting to original state because of errors...
✔ Cleaning up temporary files...

⚠ lint-staged prevented an empty git commit.
Use the --allow-empty option to continue, or check your task configuration

What happend: Prettier did run, as indicated by lint-staged, which prepared and processed the staged files. However, since the file wasn’t re-staged after formatting, the commit was prevented (indicating Prettier likely did apply changes but didn’t stage them).

Solution: I just added space, that was not enough "changes". Added a console.log line.

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

No branches or pull requests

1 participant