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 pre-commit to enforce code style practices #293

Merged
merged 4 commits into from
Dec 3, 2021
Merged

Conversation

anttimaki
Copy link
Contributor

  • Run pre-commit to fix errors in existing files
  • Run pre-commit via GitHub Actions when changes are pushed and PRs are created
  • Add a few exceptions to pre-commit config
  • Update README so developers hopefully notice to set up pre-commit on their dev environment.

In an earlier PR other options were discussed, but this approach was decided on, since it's already in use in other Thunderstore repos.

Closes #32

Markdown uses double trailing spaces as a line break. Pre-commit will
want to remove these. Remove the lines manually. This will make the
elements  be rendered next  to each other in the Storybook, but
figuring out how to keep the trailing whitespace in this one file
doesn't seem worith it.
Config was changed so that:

- trailing new lines are not required in svg files
- prettier doesn't mess with indentation in yaml files
- prettier doesn't mess with line lengths in yaml files
@anttimaki anttimaki merged commit 6f9db09 into master Dec 3, 2021
@anttimaki anttimaki deleted the pre-commit branch December 3, 2021 12:45
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