Skip to content

chore: Pre-commit hooks - #2

Open
gcgoncalves wants to merge 1 commit into
mainfrom
pre-commit
Open

chore: Pre-commit hooks#2
gcgoncalves wants to merge 1 commit into
mainfrom
pre-commit

Conversation

@gcgoncalves

Copy link
Copy Markdown
Contributor

Add prettier, eslint and unit tests to the pre-commit hook.

Signed-off-by: Gabriel Costa <gabrielcg@proton.me>

@marekdano marekdano left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestions (non-blocking)

  • The hook is heavy for a pre-commit: format:check + lint (whole
    src+e2e) + full build + full vitest run. That's likely tens of seconds
    to minutes on every commit, which tends to push people toward
    git commit --no-verify. Common pattern: run lint-staged (prettier/eslint on
    staged files only) at pre-commit, and move build + the full test suite to a
    pre-push hook or rely on CI. That keeps commits fast while still gating
    pushes.
  • Stale comment in eslint.config.js: it warns about "a
    second, differently-configured prettier.config.js one directory up (repo
    root)." That referred to the old monorepo layout; there's no such file in this
    standalone repo. Now that .prettierrc is added, that comment is misleading
    and could be trimmed. Pre-existing, so optional.

@gcgoncalves

Copy link
Copy Markdown
Contributor Author

Great point, @marekdano! I'll update accordingly.

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