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 configuration #1969

Merged
merged 1 commit into from Oct 26, 2023
Merged

Add pre-commit configuration #1969

merged 1 commit into from Oct 26, 2023

Conversation

redsun82
Copy link
Contributor

@redsun82 redsun82 commented Oct 26, 2023

pre-commit is a framework for easy set-up of pre-commit hooks.

This adds configuration for it to run:

  • ts compilation
  • ts linting
  • pr-checks synchronization

The latter required the sync.py to be callable from the project root.

pre-commit can be enabled with

python3 -m pip install pre-commit
pre-commit install

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

[pre-commit](https://pre-commit.com/) is a framework for easy set-up
of pre-commit hooks.

This adds configuration for it to run:
* ts compilation
* ts linting
* pr-checks synchronization

The latter required the `sync.py` to be callable from the project root.

`pre-commit` can be enabled with
```
python3 -m pip install pre-commit
pre-commit install
```
@redsun82 redsun82 requested a review from a team as a code owner October 26, 2023 09:05
Copy link
Contributor

@henrymercer henrymercer left a comment

Choose a reason for hiding this comment

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

This looks good. It isn't for me, as it makes committing take too long, but I'm happy to approve it.

@redsun82
Copy link
Contributor Author

This looks good. It isn't for me, as it makes committing take too long, but I'm happy to approve it.

yeah, it's true I was a bit hesitant about the linting check (the other two are pretty much instant if compilation was already done). On the other hand for me that I don't work so often here, I was already bitten by committing something not passing all three of the checks 😅

FYI there is a way to tweak the configuration locally.

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.

None yet

2 participants