Skip to content

Conversation

T4rk1n
Copy link
Contributor

@T4rk1n T4rk1n commented Jun 3, 2025

  • Only lint staged files to speed up commit time from 1 minutes on avg to a couple seconds.
  • Use venv or .venv in the pre-commit hook if they are available.

No need to --no-verify anymore.

@T4rk1n T4rk1n merged commit f4dda00 into dev Jun 3, 2025
9 checks passed
@T4rk1n T4rk1n deleted the staged-pre-commit branch June 3, 2025 13:57
Copy link
Contributor

Choose a reason for hiding this comment

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

@T4rk1n Are these linting steps the same as what is triggered by npm run lint ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not really, it just lint the files that are staged and run the commands with fail-fast. But in the end it runs the proper linting for the files that changed, it cd to the proper sub npm package for eslint/prettier config of those.

Copy link
Contributor

Choose a reason for hiding this comment

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

Gotcha. Just want to make sure we don't end up in a situation where this script lints the files differently than npm run lint.

Is there a risk of that happening in the future if someone edits this file but not package.json?

Should we remove the npm run lint commands entirely? Or can we make package.json and this script both refer to the same source of truth?

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.

3 participants