{"id":31585084,"url":"https://github.com/stackvault/eslint-config-typescript","last_synced_at":"2026-05-17T06:39:04.285Z","repository":{"id":313583634,"uuid":"1051358978","full_name":"stackvault/eslint-config-typescript","owner":"stackvault","description":"TypeScript ESLint configuration","archived":false,"fork":false,"pushed_at":"2025-09-06T12:13:55.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-06T01:28:52.073Z","etag":null,"topics":["code-quality","code-style","eslint","eslint-config","eslint9","eslintconfig","flat-config","lint","stackvault","stylistic","type-checking","typescript","typescript-eslint"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@stackvault/eslint-config-typescript","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stackvault.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-05T21:11:54.000Z","updated_at":"2025-09-06T12:26:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"694768d3-5be8-4997-b055-373858d1afd2","html_url":"https://github.com/stackvault/eslint-config-typescript","commit_stats":null,"previous_names":["stackvault/eslint-config-typescript"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stackvault/eslint-config-typescript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackvault%2Feslint-config-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackvault%2Feslint-config-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackvault%2Feslint-config-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackvault%2Feslint-config-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stackvault","download_url":"https://codeload.github.com/stackvault/eslint-config-typescript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackvault%2Feslint-config-typescript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016916,"owners_count":26085887,"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-10-13T02:00:06.723Z","response_time":61,"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":["code-quality","code-style","eslint","eslint-config","eslint9","eslintconfig","flat-config","lint","stackvault","stylistic","type-checking","typescript","typescript-eslint"],"created_at":"2025-10-06T01:27:12.446Z","updated_at":"2025-10-13T19:36:11.023Z","avatar_url":"https://github.com/stackvault.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @stackvault/eslint-config-typescript\n\nModern TypeScript ESLint configuration with strict type checking and comprehensive stylistic rules. Built for ESLint 9+ flat config with full TypeScript 5.5+ support.\n\n## Features\n\n- ✨ **ESLint 9 Flat Config** - Modern configuration format with better performance\n- 🎯 **Strict Type Checking** - Comprehensive type-aware rules to catch errors at build time\n- 🎨 **Built-in Formatting** - Replaces Prettier with @stylistic/eslint-plugin for unified tooling\n- 🚀 **TypeScript 5.5+ Support** - Leverages latest TypeScript features and optimizations\n- 📦 **Zero Config Philosophy** - Sensible defaults that work out of the box\n- ⚡ **Performance Optimized** - Uses `projectService` for faster type checking\n\n## Installation\n\n```bash\nnpm install --save-dev @stackvault/eslint-config-typescript eslint typescript\n```\n\nor with Yarn:\n\n```bash\nyarn add --dev @stackvault/eslint-config-typescript eslint typescript\n```\n\n## Requirements\n\n- Node.js \u003e=18.18.0\n- ESLint \u003e=9.22.0\n- TypeScript \u003e=5.5.0\n\n## Usage\n\nCreate an `eslint.config.js` file in your project root:\n\n```javascript\nimport typeScriptConfig from '@stackvault/eslint-config-typescript';\n\nexport default [\n  ...typeScriptConfig,\n  // Your custom rules here\n];\n```\n\n### With Custom Rules\n\n```javascript\nimport typeScriptConfig from '@stackvault/eslint-config-typescript';\n\nexport default [\n  ...typeScriptConfig,\n  {\n    rules: {\n      // Override or add custom rules\n      'no-console': 'off',\n      '@typescript-eslint/no-explicit-any': 'warn',\n    }\n  }\n];\n```\n\n### For Monorepos\n\n```javascript\nimport typeScriptConfig from '@stackvault/eslint-config-typescript';\n\nexport default [\n  ...typeScriptConfig,\n  {\n    languageOptions: {\n      parserOptions: {\n        projectService: true,\n        tsconfigRootDir: import.meta.dirname,\n        project: ['./packages/*/tsconfig.json'],\n      }\n    }\n  }\n];\n```\n\n## What's Included\n\n### Type Safety Rules\n\n- **Strict type checking** with `strictTypeChecked` and `stylisticTypeChecked` configs\n- **No unsafe operations** - Prevents `any` type pollution\n- **Smart boolean expressions** - Allows practical nullish checks while maintaining safety\n- **Comprehensive async/promise rules** - Ensures proper handling of asynchronous code\n\n### Code Organization\n\n- **Enforced import sorting** with eslint-plugin-simple-import-sort\n- **Consistent type imports** - Prefers `import { type User }` syntax\n- **Naming conventions** - PascalCase for types/interfaces, T-prefix for generics\n- **Explicit return types** for functions (with smart exceptions)\n\n### Stylistic Rules (Prettier Replacement)\n\nBuilt-in formatting rules via @stylistic/eslint-plugin:\n\n- 2-space indentation\n- Single quotes\n- Semicolons required\n- Trailing commas in multiline\n- 120 character line limit\n- Consistent spacing and formatting\n\n### Special File Handling\n\n- **Test files** (`*.spec.ts`, `*.test.ts`) - Relaxed rules for testing\n- **JavaScript files** - Type checking disabled, basic linting enabled\n- **Declaration files** (`*.d.ts`) - Minimal rules for type definitions\n\n## Key Rules Explained\n\n### Type Safety\n```typescript\n// ❌ Error: no-explicit-any\nconst data: any = fetchData();\n\n// ✅ Correct\nconst data: User = fetchData();\n```\n\n### Smart Boolean Expressions\n```typescript\n// ✅ Allowed - practical nullish checks\nif (user) { }  // User | null\nif (isEnabled) { }  // boolean | undefined\n\n// ❌ Error - string/number coercion\nif (userName) { }  // string (use userName !== '')\nif (count) { }  // number (use count !== 0)\n```\n\n### Async/Promise Handling\n```typescript\n// ❌ Error: no-floating-promises\nfetchData();\n\n// ✅ Correct\nawait fetchData();\n// or\nvoid fetchData();\n```\n\n### Import Organization\n```typescript\n// ✅ Automatically sorted and organized\nimport { type User, type Product } from '@/types';\nimport { calculateTotal } from '@/utils';\nimport React from 'react';\n```\n\n## VSCode Integration\n\nAdd to `.vscode/settings.json`:\n\n```json\n{\n  \"editor.codeActionsOnSave\": {\n    \"source.fixAll.eslint\": \"explicit\"\n  },\n  \"eslint.experimental.useFlatConfig\": true,\n  \"eslint.validate\": [\n    \"javascript\",\n    \"javascriptreact\",\n    \"typescript\",\n    \"typescriptreact\"\n  ]\n}\n```\n\n## Package.json Scripts\n\n```json\n{\n  \"scripts\": {\n    \"lint\": \"eslint .\",\n    \"lint:fix\": \"eslint . --fix\",\n    \"lint:debug\": \"eslint . --debug\",\n    \"type-check\": \"tsc --noEmit\"\n  }\n}\n```\n\n## Migration from ESLint 8\n\n1. Remove `.eslintrc.*` files\n2. Create `eslint.config.js` with flat config\n3. Update VSCode settings for flat config\n4. Remove Prettier (this config handles formatting)\n\n## Performance Tips\n\n- Use `projectService: true` for better TypeScript performance\n- Enable ESLint cache: `eslint . --cache`\n- Exclude build directories in your tsconfig.json\n- Consider using `--max-warnings 0` in CI/CD\n\n## Philosophy\n\nThis configuration prioritizes:\n\n1. **Type Safety** - Catch errors at build time, not runtime\n2. **Consistency** - Unified formatting without Prettier\n3. **Performance** - Optimized for large TypeScript projects\n4. **Developer Experience** - Clear errors with practical rules\n\n## License\n\nMIT\n\n## Contributing\n\nIssues and PRs welcome at [GitHub](https://github.com/stackvault/eslint-config-typescript)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackvault%2Feslint-config-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackvault%2Feslint-config-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackvault%2Feslint-config-typescript/lists"}