Skip to content

Add configuration files for ESLint, Prettier, set up CI workflow and Husky pre-commit hooks#22

Merged
samueljd merged 4 commits into
mainfrom
chore/enhance-eslint-typescript-config
May 14, 2025
Merged

Add configuration files for ESLint, Prettier, set up CI workflow and Husky pre-commit hooks#22
samueljd merged 4 commits into
mainfrom
chore/enhance-eslint-typescript-config

Conversation

@samueljd

@samueljd samueljd commented May 13, 2025

Copy link
Copy Markdown
Contributor

Fixes #13

Changelog

ESLint and TypeScript Configuration

  • Added plugin:@typescript-eslint/strict for enhanced type checking
  • Added eslint-plugin-unused-imports to automatically remove unused imports
  • Improved TypeScript error detection with stricter rules:
  • no-non-null-assertion: Upgraded to error
  • no-explicit-any: Upgraded to error
  • no-floating-promises: Upgraded to error
  • Added no-unnecessary-condition
  • Added prefer-nullish-coalescing and prefer-optional-chain
  • Enhanced import organization with additional rules:
    • import/first
    • import/newline-after-import
    • import/no-useless-path-segments
    • import/no-cycle

VS Code Integration

  • Enabled automatic removal of unused imports on save
  • Configured import organization on save
  • Added TypeScript-specific settings:
  • Non-relative imports preference
  • Single quotes for imports
  • Auto-update imports on file move
  • Added recommended extensions for improved development

Project Configuration

  • Added .nvmrc for Node.js version management (v20.10.0)
  • Optimized .gitignore for React/Vite/Tailwind stack
  • Enhanced lint-staged to enforce unused import removal in pre-commit
  • Added bundle analysis capability with rollup-plugin-visualizer

Developer Experience

  • Added caching to ESLint for better performance
  • Added separate script commands:
  • lint:fix: Fix ESLint issues
  • format:check: Verify formatting
  • build:analyze: Analyze bundle size

@samueljd samueljd force-pushed the chore/enhance-eslint-typescript-config branch 7 times, most recently from 0720afc to bee6b7e Compare May 13, 2025 13:12
@samueljd samueljd requested a review from jwinston-bn May 13, 2025 13:14
Comment thread .github/workflows/ci.yml
@samueljd samueljd force-pushed the chore/enhance-eslint-typescript-config branch from bee6b7e to 634dde0 Compare May 13, 2025 13:57
@joelthe1 joelthe1 requested a review from brianineza01 May 13, 2025 13:58
Comment thread .npmrc Outdated
Comment thread .nvmrc
Comment thread .prettierignore
@samueljd samueljd force-pushed the chore/enhance-eslint-typescript-config branch from 634dde0 to 68ba0b9 Compare May 13, 2025 14:48
@samueljd samueljd requested a review from brianineza01 May 13, 2025 14:49
@samueljd samueljd force-pushed the chore/enhance-eslint-typescript-config branch from 68ba0b9 to 181723d Compare May 13, 2025 14:54
brianineza01
brianineza01 previously approved these changes May 13, 2025
@samueljd samueljd force-pushed the chore/enhance-eslint-typescript-config branch from 181723d to 5ad8f0a Compare May 14, 2025 05:09
@samueljd samueljd requested a review from brianineza01 May 14, 2025 05:13
@samueljd samueljd merged commit b404b85 into main May 14, 2025
2 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.

Setup Coding Standards and Enforcement

4 participants