{"id":31386814,"url":"https://github.com/brettstark73/create-quality-automation","last_synced_at":"2025-09-28T20:09:46.022Z","repository":{"id":316153738,"uuid":"1056676407","full_name":"brettstark73/create-quality-automation","owner":"brettstark73","description":"🚀 Reusable quality automation setup with GitHub Actions, Husky, lint-staged, and Prettier for any project","archived":false,"fork":false,"pushed_at":"2025-09-27T20:51:03.000Z","size":7358,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-28T01:54:28.030Z","etag":null,"topics":["automation","bootstrap","cli","eslint","github-actions","husky","lint-staged","npm-package","prettier","quality","scaffold","stylelint","template","typescript"],"latest_commit_sha":null,"homepage":"https://github.com/brettstark73/create-quality-automation#readme","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brettstark73.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-14T15:28:18.000Z","updated_at":"2025-09-27T20:51:05.000Z","dependencies_parsed_at":"2025-09-23T02:38:35.796Z","dependency_job_id":"20e312fc-b70d-4136-b66a-baa54a5d3ac3","html_url":"https://github.com/brettstark73/create-quality-automation","commit_stats":null,"previous_names":["brettstark73/quality-automation-template","brettstark73/create-quality-automation"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/brettstark73/create-quality-automation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettstark73%2Fcreate-quality-automation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettstark73%2Fcreate-quality-automation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettstark73%2Fcreate-quality-automation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettstark73%2Fcreate-quality-automation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brettstark73","download_url":"https://codeload.github.com/brettstark73/create-quality-automation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettstark73%2Fcreate-quality-automation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277422628,"owners_count":25815346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-28T02:00:08.834Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","bootstrap","cli","eslint","github-actions","husky","lint-staged","npm-package","prettier","quality","scaffold","stylelint","template","typescript"],"created_at":"2025-09-28T20:09:44.982Z","updated_at":"2025-09-28T20:09:46.016Z","avatar_url":"https://github.com/brettstark73.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Create Quality Automation 🚀\n\nBootstrap quality automation in any project with GitHub Actions, Husky pre-commit hooks, lint-staged, and Prettier formatting. Modern ESLint 9 flat config with automatic TypeScript support.\n\n## ✨ Features\n\n- **🔧 Prettier Code Formatting** - Consistent code style across your project\n- **🪝 Husky Pre-commit Hooks** - Automatic quality checks before commits\n- **⚡ Lint-staged Processing** - Only process changed files for speed\n- **🤖 GitHub Actions** - Automated quality checks in CI/CD\n- **📦 One Command Setup** - `npx create-quality-automation@latest`\n- **🔄 TypeScript Smart** - Auto-detects and configures TypeScript projects\n- **🆕 Modern Tooling** - ESLint 9 flat config, Husky 9, latest dependencies\n- **🔒 Security Automation** - Blocking npm audit and hardcoded secrets scanning\n\n## 🚀 Quick Start\n\n### For Any Project (Recommended)\n\n```bash\n# Navigate to your project (must be a git repository)\ncd your-project/\n\n# Bootstrap quality automation\nnpx create-quality-automation@latest\n\n# Install new dependencies\nnpm install\n\n# Set up pre-commit hooks\nnpm run prepare\n```\n\n**That's it!** Your project now has comprehensive quality automation.\n\n### Update Existing Setup\n\n```bash\n# Update to latest configurations\nnpx create-quality-automation@latest --update\n\n# Install any new dependencies\nnpm install\n\n# Verify everything works\nnpm run lint\n```\n\n### New Project from Scratch\n\n```bash\n# Create new project\nmkdir my-awesome-project \u0026\u0026 cd my-awesome-project\ngit init\nnpm init -y\n\n# Add quality automation\nnpx create-quality-automation@latest\nnpm install \u0026\u0026 npm run prepare\n\n# Start coding with quality tools active!\necho \"console.log('Hello, quality world!')\" \u003e index.js\ngit add . \u0026\u0026 git commit -m \"feat: initial commit with quality tools\"\n```\n\n## 📁 What Gets Added to Your Project\n\n```\nyour-project/\n├── .github/\n│   └── workflows/\n│       └── quality.yml          # GitHub Actions workflow\n├── .editorconfig              # Editor defaults\n├── eslint.config.cjs          # ESLint flat config (JS)\n├── .prettierrc               # Prettier configuration\n├── .prettierignore            # Files to ignore in formatting\n├── .husky/                     # Pre-commit hooks (created after setup)\n└── package.json                # Updated with scripts and dependencies\n```\n\n## ⚙️ Configuration\n\n### Node Version\n\n- This template pins Node to version 20 for local dev and CI.\n- Tools included:\n  - `.nvmrc` → auto-switch with `nvm use`\n  - `package.json` → `engines.node \"\u003e=20\"` and Volta pin for Node/npm\n  - `.npmrc` → `engine-strict = true` to enforce engine checks\n\nConservative behavior:\n\n- The setup script adds engines/Volta pins if they are missing, but does not overwrite your existing values.\n- This avoids unexpectedly changing repos already pinned to another Node version.\n\n### Prettier Configuration (`.prettierrc`)\n\n```json\n{\n  \"semi\": false,\n  \"singleQuote\": true,\n  \"tabWidth\": 2,\n  \"trailingComma\": \"es5\",\n  \"printWidth\": 80,\n  \"bracketSpacing\": true,\n  \"arrowParens\": \"avoid\"\n}\n```\n\n### Lint-staged Configuration (in `package.json`)\n\n```json\n{\n  \"lint-staged\": {\n    \"package.json\": [\"prettier --write\"],\n    \"**/*.{js,jsx,mjs,cjs,html}\": [\"eslint --fix\", \"prettier --write\"],\n    \"**/*.{css,scss,sass,less,pcss}\": [\"stylelint --fix\", \"prettier --write\"],\n    \"**/*.{json,md,yml,yaml}\": [\"prettier --write\"]\n  }\n}\n```\n\nIf the setup script detects TypeScript (via a `typescript` dependency or a `tsconfig` file), the `**/*.{js,jsx,mjs,cjs,html}` pattern automatically expands to include `.ts` and `.tsx`.\n\nThe CLI scans your repository for existing CSS, Sass, Less, and PostCSS files so Stylelint targets only the directories you already use. If you have custom CSS globs in `lint-staged`, the setup script keeps them instead of overwriting them with broad defaults.\n\n## 🔧 Customization\n\n### Extending ESLint/Stylelint\n\n- ESLint flat config lives in `eslint.config.cjs`. Adjust the exported array to tweak rules—for example, update the final rule block to warn on console usage:\n  ```js\n  // eslint.config.cjs\n  module.exports = [\n    /* ...existing entries... */\n    {\n      files: ['**/*.{js,jsx,mjs,cjs,html}'],\n      rules: {\n        // existing rules...\n        'no-console': 'warn',\n      },\n    },\n  ]\n  ```\n  When TypeScript is detected the script writes a variant with `@typescript-eslint`; customize the `files: ['**/*.{ts,tsx}']` block in the same way.\n- Stylelint rules live in `.stylelintrc.json`; example to relax specificity:\n  ```json\n  {\n    \"extends\": [\"stylelint-config-standard\"],\n    \"rules\": { \"no-descending-specificity\": null }\n  }\n  ```\n\n### Adding TypeScript Support\n\n1. Add TypeScript to your project: `npm install --save-dev typescript`\n2. Re-run the setup script (`npm run setup` or `node setup.js`) to enable `@typescript-eslint` linting and TypeScript-aware lint-staged patterns.\n3. Update workflow to include type checking:\n   ```yaml\n   - name: TypeScript Check\n     run: npx tsc --noEmit\n   ```\n\n### Adding Testing\n\n- The template ships with an integration smoke test (`npm test`) that exercises `setup.js` end-to-end.\n- Replace or extend `tests/setup.test.js` with your project’s preferred test runner (Jest, Vitest, Playwright, etc.).\n- Keep the `test` script aligned with your chosen framework so CI executes the same checks.\n\n## 📜 Available Scripts\n\nAfter setup, your project will have these scripts:\n\n- `npm run format` - Format all files with Prettier\n- `npm run format:check` - Check if files are formatted (used in CI)\n- `npm run prepare` - Set up Husky hooks (run after npm install)\n- `npm run lint` / `npm run lint:fix` - ESLint flat config (auto-extending to TS) + Stylelint\n- `npm test` - Runs the bootstrap regression test (customize per project)\n\n## 🤖 GitHub Actions Workflow\n\nThe workflow runs on:\n\n- Push to `main`, `master`, or `develop` branches\n- Pull requests to those branches\n\nIt performs:\n\n- ✅ Prettier formatting check\n- ✅ ESLint and Stylelint checks\n- ✅ Blocking security audit (npm audit)\n- ✅ Hardcoded secrets scanning\n\n## 🛠️ Troubleshooting\n\n### \"husky not found\" Error\n\nRun `npm run prepare` after installing dependencies.\n\n### Prettier Conflicts with Other Formatters\n\nAdd conflicting formatters to `.prettierignore` or configure them to work together.\n\n### GitHub Actions Not Running\n\nEnsure your repository has Actions enabled in Settings \u003e Actions.\n\n### Vercel Runtime (Note)\n\n- Prefer auto‑detection of Node from `package.json` `engines` when deploying to Vercel.\n- Avoid hard‑coding a `runtime` value in `vercel.json` unless confirmed against current Vercel docs — incorrect values can break deploys.\n- The template pins Node 20 for local/CI via `.nvmrc`, `engines`, and optional Volta; this is independent of Vercel’s runtime.\n\n## 🔄 Updating\n\nTo update an existing project:\n\n```bash\nnpx create-quality-automation@latest --update\nnpm install\n```\n\nThe tool safely merges new configurations without overwriting your customizations.\n\n## 🤝 Contributing\n\nWant to improve this template?\n\n1. Fork the repository\n2. Make your changes\n3. Test with a sample project\n4. Submit a pull request\n\n## 📄 License\n\nMIT License - feel free to use in any project!\n\n## 🙋‍♂️ Support\n\nIf you run into issues:\n\n1. Check the troubleshooting section above\n2. Review the GitHub Actions logs\n3. Open an issue in this repository\n\n---\n\n**Made with ❤️ to make code quality effortless**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrettstark73%2Fcreate-quality-automation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrettstark73%2Fcreate-quality-automation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrettstark73%2Fcreate-quality-automation/lists"}