-
Notifications
You must be signed in to change notification settings - Fork 0
Improve developer tooling by adding Vitest, Prettier, Husky, lint-staged #18
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR improves developer tooling by adding modern development infrastructure including Vitest for testing, Prettier for code formatting, Husky for Git hooks, and lint-staged for pre-commit checks.
Changes:
- Added Vitest testing framework with example tests and coverage configuration
- Added Prettier for consistent code formatting with pre-commit hooks via Husky
- Added comprehensive developer documentation (AGENTS.md, copilot-instructions.md)
- Applied Prettier formatting across all TypeScript/TSX files
- Enhanced CI/CD pipeline with formatting checks, type checking, and test execution
Reviewed changes
Copilot reviewed 45 out of 49 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.config.ts | Vitest configuration with jsdom environment and coverage setup |
| package.json | Added test, format, and pre-commit scripts with new dependencies |
| .prettierrc/.prettierignore | Prettier configuration for consistent formatting |
| .husky/pre-commit | Pre-commit hook running lint-staged |
| eslint.config.js | Added eslint-config-prettier to prevent conflicts |
| src/test/setup.ts | Vitest test setup importing jest-dom matchers |
| src/lib/utils.test.ts | Example unit tests for cn utility function |
| src/components/EmptyState.test.tsx | Component tests for EmptyState |
| .github/workflows/ci.yml | Enhanced CI with format checks, type checking, and tests |
| AGENTS.md | New AI agent reference documentation |
| .github/copilot-instructions.md | New GitHub Copilot context instructions |
| All .tsx/.ts files | Prettier formatting applied (quotes, semicolons, indentation) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
884ba31 to
89a3236
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 45 out of 51 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 45 out of 51 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
89a3236 to
8fbf5a1
Compare
- Use optional chaining for firstChild in store.ts (line 400) - Add non-null assertions for areaId and componentId in sovd-api.ts (lines 159, 188) - Add vitest.config.ts to tsconfig.node.json include array - Add nullish coalescing fallback for componentId in store.ts (lines 591, 612)
8fbf5a1 to
5ee593e
Compare
|
@mfaferek93 Sorry for the size of this PR 😓 Most of this is due to a month of not updating the package.json and adding additional tools. The rest is just trying to use the same formatting in Prettier. |
mfaferek93
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH I didn't find anything to fix here, so LTGM!
Pull Request
Summary
This PR improves developer tooling by adding modern development infrastructure including Vitest for testing, Prettier for code formatting, Husky for Git hooks, and lint-staged for pre-commit checks.
Changes:
Issue
Link the related issue (required):
Type
Testing
Added CI and unit testing.
Checklist
npm run lint)npm run build)