Chore/lint#22
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull Request Overview
This PR sets up linting, formatting, and CI automation for the codebase. It configures ESLint, Prettier, and TypeScript checks that will run automatically on pull requests, eliminating the need for manual linting commands.
- Added comprehensive development tooling with ESLint, Prettier, and TypeScript configuration
- Implemented GitHub Actions CI workflow to automatically check code quality on pull requests
- Updated existing files to conform to new formatting standards (single quotes, import sorting)
Reviewed Changes
Copilot reviewed 8 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| package.json | Added lint, format, and type-check scripts plus related dev dependencies |
| .prettierrc | Configured code formatting rules and import sorting |
| .eslintrc.json | Set up ESLint rules for Next.js with unused imports checking |
| .github/workflows/ci.yml | Created CI workflow for automated quality checks |
| .github/pull_request_template.md | Added PR template with quality checklist |
| .npmrc | Configured pnpm settings for dependency management |
| next.config.ts | Reformatted to match new Prettier rules |
| middleware.ts | Applied formatting changes and updated matcher pattern |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| - uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 9 |
There was a problem hiding this comment.
The pnpm version should be pinned to match the packageManager field in package.json (9.0.0) for consistency, or use a more specific version like 9.12.0.
| version: 9 | |
| version: 9.0.0 |
|
|
恐らくCIが回らないのはリポジトリオーナー(Hackathon主催者側)の利用枠制限で止められる可能性が高そう。 |
|
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 7 out of 10 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| "format:check": "prettier --check .", | ||
| "type-check": "tsc --noEmit", | ||
| "clean": "rm -rf .next out", | ||
| "postinstall": "pnpm -s dlx supabase gen types typescript --project-id $SUPABASE_PROJECT_ID > utils/supabase/database.types.ts || echo 'skip supabase typegen (SUPABASE_PROJECT_ID not set)'" |
There was a problem hiding this comment.
The postinstall script uses an environment variable ($SUPABASE_PROJECT_ID) without validation and writes to a file. This could potentially expose sensitive project information or create security vulnerabilities if the environment variable contains malicious content.
| "postinstall": "pnpm -s dlx supabase gen types typescript --project-id $SUPABASE_PROJECT_ID > utils/supabase/database.types.ts || echo 'skip supabase typegen (SUPABASE_PROJECT_ID not set)'" | |
| "postinstall": "node scripts/generate-supabase-types.js" |
対応完了✅
やったこと
Actionsは環境的に動作できない可能性があったので、削除しました。