JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 41
  • Score
    100M100P100Q79544F
  • License MIT

Reusable code quality configuration toolkit with ESLint, Prettier, Husky, Commitlint, GitHub Actions, and editor config support.

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (code-quality-kit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    ๐Ÿ”ง Code Quality Kit

    This Code Quality Kit provides a plug-and-play setup to enforce consistent code quality across projects using:

    • โœ… Prettier โ€“ Code formatting
    • โœ… ESLint โ€“ Linting with Prettier integration
    • โœ… Husky โ€“ Git hooks
    • โœ… Lint-Staged โ€“ Only run formatters on staged files
    • โœ… Commitlint โ€“ Enforce conventional commits
    • โœ… GitHub Actions โ€“ CI for quality checks

    ๐Ÿ“ฆ Installation

    1. Install the Kit

    npm install --save-dev code-quality-kit

    ๐Ÿš€ Setup

    Run the provided setup script:

    npx code-quality-kit

    This will:

    • Create config files
    • Set up Husky pre-commit & commit-msg hooks
    • Add GitHub Actions CI workflow
    • Enable Prettier + ESLint + Commitlint

    โš™๏ธ Configuration

    Customize features by adding a .codequalityrc.json file in your project root:

    {
      "husky": true,
      "eslint": true,
      "prettier": true,
      "commitlint": true,
      "ci": true
    }

    You can turn off any part of the setup by setting its value to false.


    ๐Ÿงช Pre-commit Hook

    The pre-commit hook runs:

    • โœ… Prettier formatting (npx prettier --write .)
    • โœ… ESLint autofix (npx eslint . --fix)
    • โœ… Lint-staged for staged files only

    ๐Ÿงช Commit-msg Hook

    Ensures commit messages follow Conventional Commits:

    npx commitlint --edit $1

    โœ… GitHub Actions โ€“ Quality Check

    Automatically runs formatting and linting checks on push and pull request:

    .github/workflows/quality-check.yml

    To get real-time linting and formatting feedback in your editor:

    Extension Description
    ESLint Integrates ESLint into VS Code
    Prettier - Code formatter Automatically format code
    Conventional Commits (optional) Helps write conventional commit messages
    EditorConfig for VS Code Respects .editorconfig rules

    ๐Ÿ“ Output Files

    The following files will be created or updated:

    .prettierrc.js
    .eslintrc.js
    commitlint.config.js
    lint-staged.config.js
    .husky/pre-commit
    .husky/commit-msg
    .github/workflows/quality-check.yml

    ๐Ÿ‘ฅ Author

    Kasun Udara โ€“ kasunu2001@gmail.com