Skip to content

Conversation

@ch-iv
Copy link
Contributor

@ch-iv ch-iv commented Nov 22, 2025

Fixes #40

TLDR

Added stricter linting rules, TypeScript typecheck, pre-commit hooks, and a GitHub action to ensure code quality.

What changed?

  1. GitHub Actions Workflow (.github/workflows/ci.yml)
  • New CI pipeline that runs on push to main and pull requests
    • Tests (vitest)
    • Format checking (prettier)
    • Linting (eslint)
    • Type checking (tsc)
  1. Pre-commit Hook (.husky/pre-commit)
  • Added new pre-commit configuration
  • Runs lint-staged for staged file checks
  • Runs typecheck after lint-staged
  1. ESLint Rules (eslint.config.mjs)
  • Added padding lines between function statements (error)
  • Added requirement for explicit function return types in TypeScript (error)
  1. TypeScript Configuration (tsconfig.json)
  • Stricter compilation options enabled

Copilot AI review requested due to automatic review settings November 22, 2025 18:18
@vercel
Copy link

vercel bot commented Nov 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
trcc Ready Ready Preview Comment Nov 22, 2025 8:32pm

Copy link

Copilot AI left a 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 enhances code quality by adding stricter TypeScript configuration, additional ESLint rules, and automated checks in CI. The changes enforce explicit return types, enable comprehensive TypeScript strict mode checks, and add pre-commit hooks using husky and lint-staged.

Key changes:

  • Enabled TypeScript strict mode with additional safety checks (noUncheckedIndexedAccess, noUnusedLocals, etc.)
  • Added ESLint rules for explicit function return types and padding between functions
  • Introduced husky and lint-staged for pre-commit quality checks
  • Added GitHub Actions CI workflow for automated testing, linting, formatting, and typechecking

Reviewed changes

Copilot reviewed 9 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tsconfig.json Enabled strict mode and additional TypeScript compiler safety checks, restricted includes to src/ and tests/ directories
src/lib/client/supabase/server.ts Updated to use bracket notation for process.env access (required by noPropertyAccessFromIndexSignature)
src/lib/api/getExample.ts Added explicit return type annotation and updated import path to use index export
src/app/page.tsx Added explicit return type annotation for Home component
src/app/layout.tsx Added explicit return type annotation for RootLayout component
package.json Added husky and lint-staged dependencies, updated scripts for typecheck and combined check/fix commands
package-lock.json Updated lock file with new dependencies and removed unused peer dependencies
eslint.config.mjs Added rules for explicit function return types and padding between functions
.lintstagedrc.mts New lint-staged configuration for pre-commit hooks
.husky/pre-commit New pre-commit hook script
.gitignore Added .claude directory exclusion
.github/workflows/ci.yml New CI workflow for automated checks

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a 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 9 out of 12 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@notjackl3 notjackl3 merged commit d64e727 into main Nov 26, 2025
3 checks passed
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.

GitHub CI should run formatting and linting

3 participants