{"_id":"@anyauth/tsconfig","name":"@anyauth/tsconfig","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@anyauth/tsconfig","version":"0.1.0","description":"Shared TypeScript configuration for AnyAuth projects","main":"base.json","keywords":["typescript","config","anyauth"],"author":{"name":"AnyAuth"},"license":"MIT","publishConfig":{"access":"public"},"gitHead":"56a86f9083ebcd466df6b975d56e5177877e0d11","_id":"@anyauth/tsconfig@0.1.0","_nodeVersion":"22.19.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-kIo3se36R50bNISE5aIUaJDE/468lvu8xVtk6WjV1exV2nKsZKF1ZdNq7tlv2Rbg9Vjl02TA24plbTLHq0X/Tw==","shasum":"cd71ab7f9cc071fe22371906955c76a39dba5d15","tarball":"https://registry.npmjs.org/@anyauth/tsconfig/-/tsconfig-0.1.0.tgz","fileCount":5,"unpackedSize":3540,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDTeR2KAq/Cf5QIISwWSjjrw8naLrDrSjFXBEzO2glZWQIhAML+HzXjSFnTU2zVu9bud6OOsBY7ZgBrfc2gT2qj97yg"}]},"_npmUser":{"name":"schenanigans","email":"tim@schenanigans.com"},"directories":{},"maintainers":[{"name":"schenanigans","email":"tim@schenanigans.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tsconfig_0.1.0_1760118142930_0.18238453356676754"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-10T17:42:22.840Z","0.1.0":"2025-10-10T17:42:23.115Z","modified":"2025-10-10T17:42:23.385Z"},"maintainers":[{"name":"schenanigans","email":"tim@schenanigans.com"}],"description":"Shared TypeScript configuration for AnyAuth projects","keywords":["typescript","config","anyauth"],"author":{"name":"AnyAuth"},"license":"MIT","readme":"# @anyauth/tsconfig\n\nShared TypeScript configuration for AnyAuth projects.\n\n## Installation\n\n```bash\npnpm add -D typescript @anyauth/tsconfig\n```\n\n## Usage\n\n### Base Configuration\n\nFor general TypeScript projects:\n\n```json\n{\n  \"extends\": \"@anyauth/tsconfig/base.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./dist\"\n  },\n  \"include\": [\"src\"]\n}\n```\n\n### Cloudflare Workers\n\nFor Cloudflare Workers projects:\n\n```json\n{\n  \"extends\": \"@anyauth/tsconfig/worker.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./dist\",\n    \"paths\": {\n      \"@/*\": [\"./*\"]\n    }\n  },\n  \"include\": [\"src\"]\n}\n```\n\n**Note**: Install `@cloudflare/workers-types` for Workers type definitions:\n\n```bash\npnpm add -D @cloudflare/workers-types\n```\n\n### React/Next.js\n\nFor React and Next.js projects:\n\n```json\n{\n  \"extends\": \"@anyauth/tsconfig/react.json\",\n  \"compilerOptions\": {\n    \"paths\": {\n      \"@/*\": [\"./*\"]\n    }\n  },\n  \"include\": [\"next-env.d.ts\", \"**/*.ts\", \"**/*.tsx\", \".next/types/**/*.ts\"],\n  \"exclude\": [\"node_modules\"]\n}\n```\n\n## Configurations\n\n### Base\n\nGeneral TypeScript configuration with:\n\n- **Target**: ES2020\n- **Module**: ESNext with bundler resolution\n- **Strict mode**: Enabled\n- **No emit**: True (for type checking only)\n- **ES module interop**: Enabled\n- **JSON resolution**: Enabled\n- **Unused locals/parameters**: Error\n- **Fallthrough cases**: Error\n\n### Worker\n\nExtends base with Cloudflare Workers-specific:\n\n- **Target**: ES2022\n- **Types**: Cloudflare Workers types\n- **JSX**: React (for Hono JSX)\n\n### React\n\nExtends base with React-specific:\n\n- **Target**: ES2017\n- **Lib**: DOM, DOM.Iterable, ESNext\n- **JSX**: Preserve (for Next.js)\n- **Plugins**: Next.js plugin\n\n## Best Practices\n\n1. Always extend one of these base configs rather than copy-pasting\n2. Use `paths` for custom module resolution\n3. Add `outDir` only if you're emitting files (most projects don't need this)\n4. Keep project-specific includes/excludes in your local tsconfig.json\n\n## Version Compatibility\n\n- TypeScript 5.0+\n- @cloudflare/workers-types: Latest\n- Next.js 14+ (for React config)\n","readmeFilename":"README.md","_rev":"1-229331e2b5506165576b594f7e246e58"}