Cursor rule
.cursor/rules/typescript.mdcTypeScript conventions for @contentstack/utils (src and tests)
Cursor rules
Quality
82/100
Scores the file, not the repository.Length
178 words
6 headings · 0 code blocksRepository
5
— · pushed 1 days agoLast changed
3 days ago
First indexed 3 days ago.123456789# TypeScript — `@contentstack/utils`1011## Tooling1213- **TypeScript ~4.9** (`package.json`, `tsconfig.json`).14- **Bundler output:** `tsc` emits to `dist/lib` with declarations in `dist/types`; **Rollup** produces `dist/index.es.js` (`rollup.config.js`).15- **Strict mode** is on with **`strictNullChecks: false`** — new code should still minimize unnecessary null/undefined gaps when touching APIs.1617## Layout1819- **Library code:** `src/**/*.ts` only (`tsconfig.json` `include`); **tests** are under `__test__/` (excluded from `tsc` program but type-checked via Jest/tsconfig paths).20- **Public exports:** Maintain **`src/index.ts`** as the single export surface unless intentionally adding secondary entry points.2122## Style and lint2324- Match existing naming (PascalCase types, camelCase functions, existing file layout under `Models/`, `nodes/`, `helper/`, `options/`).25- **ESLint** flat config: `eslint.config.js` — `@typescript-eslint` recommended for `__test__`; source files use `js.configs.recommended` baseline.26- **Prettier:** `npm run format` scopes `src/**/*.ts`; keep formatting consistent when editing tests too.2728## JSON / assets2930- **`src/assets/regions.json`:** Consumed by `src/endpoints.ts`; populated by **`npm run download-regions`** during `prebuild`. Do not assume the file is committed (see root `.gitignore`).3132## Logging3334- No shared logger dependency; avoid introducing `console` noise in library paths unless consistent with nearby code.35
Also in contentstack/contentstack-utils-javascript
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| contentstack/contentstack-utils-javascript.cursor/rules/code-review.mdc · 5 | Cursor rules | testgitdependenciesapi+1 | 56/100 | 3 days ago | |
| contentstack/contentstack-utils-javascript.cursor/rules/testing.mdc · 5 | Cursor rules | buildteststyletesting-strategy | 71/100 | 3 days ago | |
| contentstack/contentstack-utils-javascript.cursor/rules/typescript-contentstack-utils.mdc · 5 | Cursor rules | styledocs | 56/100 | 3 days ago | |
| contentstack/contentstack-utils-javascriptAGENTS.md · 5 | AGENTS.md | setupbuildtestlint-format+6 | 90/100 | 3 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago |
