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

Use lint-staged to run prettier #2947

Merged
merged 12 commits into from
Sep 30, 2021
Merged

Use lint-staged to run prettier #2947

merged 12 commits into from
Sep 30, 2021

Conversation

jeffposnick
Copy link
Contributor

Fixes #2944, hopefully. It seems to work as expected when I tested on a Windows tablet using Power Shell, with node and npm manually installed.

This switches to using lint-staged to orchestrate that process instead of git-format-staged.

Also, when investigating this issue, I realized that the glob patterns in our .prettierignore were not configured properly, and there were a bunch of TypeScript source files that should have been formatted, but weren't. So the cosmetic fixes to all those files got picked up in this PR as well.

CC: @StephanBijzitter

Copy link
Collaborator

@tropicadri tropicadri left a comment

Choose a reason for hiding this comment

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

TS lint is complaining of a couple of issues other than that it lgtm

@jeffposnick
Copy link
Contributor Author

Some of the linting issues were introduced by prettier reformatting the code, so that our comments that disable eslint on the following line no longer applied to the line we expected...

That also made me realize that I neglected to add back the pre-push hook that runs our linting, since it's really silly to push to a PR only to find out that it fails CI. I've re-added that.

I also will update our guide to contributing code in a separate PR to clearly spell out what needs to be done to get up and running locally, including on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants