Skip to content

Add formatting checks to pre-commit hook and CI#367

Open
justanotherariel wants to merge 3 commits into
mainfrom
add-format-checks
Open

Add formatting checks to pre-commit hook and CI#367
justanotherariel wants to merge 3 commits into
mainfrom
add-format-checks

Conversation

@justanotherariel
Copy link
Copy Markdown
Member

Proposed Changes

  • Add husky + lint-staged to run Prettier and ESLint on staged .ts files before commit
  • Add prettier --check step to CI lint job
  • Include tests/ in the format script
  • Format all files which weren't formatted before

@justanotherariel justanotherariel marked this pull request as draft April 29, 2026 20:13
@justanotherariel justanotherariel marked this pull request as ready for review April 29, 2026 20:36
@edenhaus
Copy link
Copy Markdown
Member

edenhaus commented May 5, 2026

Will husky be executed similar to prek before committing?

@justanotherariel
Copy link
Copy Markdown
Member Author

Yes. It's the pre-commit hook usually used in node applications. On commit, prettier and the linter (defined in package.json:27) will check all files and fix if possible automatically. Only staged files are looked at.

@edenhaus
Copy link
Copy Markdown
Member

edenhaus commented May 6, 2026

But I don't see any changes to it will be setup correctly. Will it be done automatically?
otherwise we need to extend at least the devcontainer

@justanotherariel
Copy link
Copy Markdown
Member Author

Yes, should be automatic. Devcontainer already runs 'yarn install' which will set up husky.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants