{"id":25131,"library":"cozy-tsconfig","title":"Cozy TypeScript Config","description":"Shared TypeScript configuration for Cozy Cloud projects. Version 2.0.0 requires TypeScript >=5.5.2 and Node >=16.0.0. It extends a base config and can be overridden per project. Part of the cozy-libs monorepo. Key differentiator: pre-configured for Cozy Cloud's specific needs (React, strict checks, paths for cozy packages). Regularly updated alongside Cozy ecosystem.","status":"active","version":"2.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/cozy/cozy-libs","tags":["javascript","config","configuration","cozy","ts","tsconfig","typescript"],"install":[{"cmd":"npm install cozy-tsconfig","lang":"bash","label":"npm"},{"cmd":"yarn add cozy-tsconfig","lang":"bash","label":"yarn"},{"cmd":"pnpm add cozy-tsconfig","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency required for tsconfig to work","package":"typescript","optional":false}],"imports":[{"note":"ESM-only since v2; must use JSON extends syntax.","wrong":"using require('cozy-tsconfig')","symbol":"tsconfig.json","correct":"// in tsconfig.json: {\"extends\": \"cozy-tsconfig\"}"},{"note":"Strict variant provided; path must include full filename.","wrong":"{\"extends\": \"cozy-tsconfig/strict\"}","symbol":"cozy-tsconfig/tsconfig.strict.json","correct":"{\"extends\": \"cozy-tsconfig/tsconfig.strict.json\"}"},{"note":"Library-specific config (no React JSX).","wrong":"import from 'cozy-tsconfig/lib'","symbol":"cozy-tsconfig/tsconfig.lib.json","correct":"{\"extends\": \"cozy-tsconfig/tsconfig.lib.json\"}"}],"quickstart":{"code":"// tsconfig.json\n{\n  \"extends\": \"cozy-tsconfig\",\n  \"compilerOptions\": {\n    \"outDir\": \"./build\",\n    \"rootDir\": \"./src\"\n  },\n  \"include\": [\"src\"]\n}\n\n// Verify: npx tsc --showConfig","lang":"typescript","description":"Shows how to extend the base shared config in a project's tsconfig.json."},"warnings":[{"fix":"Update TypeScript to >=5.5.2","message":"v2 requires TypeScript >=5.5.2, dropping support for older versions","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Convert any .js config to .json and use extends syntax","message":"v2 drops CommonJS support; config files must be JSON, not JS","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use 'cozy-tsconfig' in extends","message":"v1 config path 'cozy-tsconfig/tsconfig.json' deprecated in v2","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"npm install --save-dev typescript@>=5.5.2","message":"Must install typescript as devDependency, not just peer","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"npm install --save-dev cozy-tsconfig","cause":"Package not installed or not in node_modules","error":"Cannot find module 'cozy-tsconfig'"},{"fix":"Update TypeScript to >=2.1 or use tsconfig.json with 'extends'","cause":"Using older TypeScript <2.1 (extends keyword)","error":"Unknown compiler option 'extends'."},{"fix":"Use 'extends': 'cozy-tsconfig' in tsconfig.json","cause":"Trying to use cozy-tsconfig as a compiler option instead of extends","error":"error TS5023: Unknown compiler option 'cozy-tsconfig'."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}