RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/contentstack/contentstack-utils-javascript

Cursor rule

.cursor/rules/typescript.mdc

TypeScript 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 blocks

Repository

5

— · pushed 1 days ago

Last changed

3 days ago

First indexed 3 days ago.
contentstack/contentstack-utils-javascript/.cursor/rules/typescript.mdcRawGitHub
1---
2description: TypeScript conventions for @contentstack/utils (src and tests)
3globs:
4 - src/**/*.ts
5 - __test__/**/*.ts
6alwaysApply: false
7---
8 
9# TypeScript — `@contentstack/utils`
10 
11## Tooling
12 
13- **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.
16 
17## Layout
18 
19- **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.
21 
22## Style and lint
23 
24- 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.
27 
28## JSON / assets
29 
30- **`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`).
31 
32## Logging
33 
34- No shared logger dependency; avoid introducing `console` noise in library paths unless consistent with nearby code.
35 

Commands it names

  • tsc
  • eslint.config.js
  • npm run format
  • npm run download-regions

Sections

  • TypeScript — `@contentstack/utils`
  • Tooling
  • Layout
  • Style and lint
  • JSON / assets
  • Logging

What it covers

testlint-formatcode-stylearchitecturetypesagent-behaviour

Stack — with the evidence

typescript

(1.00)

jest

(1.00)

eslint

(1.00)

node

(0.95)

javascript

(0.60)

github-actions

(0.60)

Glob targeting

  • src/**/*.ts
  • __test__/**/*.ts

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
contentstack
Language
—
License
—
Archived
no

All configs in this repo

Also in contentstack/contentstack-utils-javascript

Diff this repo’s formats

One 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?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
contentstack/contentstack-utils-javascript.cursor/rules/code-review.mdc · 5Cursor rulestypescriptjest+4testgitdependenciesapi+156/1003 days ago
contentstack/contentstack-utils-javascript.cursor/rules/testing.mdc · 5Cursor rulestypescriptjest+4buildteststyletesting-strategy71/1003 days ago
contentstack/contentstack-utils-javascript.cursor/rules/typescript-contentstack-utils.mdc · 5Cursor rulestypescriptjest+4styledocs56/1003 days ago
contentstack/contentstack-utils-javascriptAGENTS.md · 5AGENTS.mdtypescriptnode+4setupbuildtestlint-format+690/1003 days ago
Diff against .cursor/rules/code-review.mdc Diff against .cursor/rules/testing.mdc Diff against .cursor/rules/typescript-contentstack-utils.mdc Diff against AGENTS.md

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126Cursor rulesgobun+5setupbuildtestlint-format+6100/1003 days ago
TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45Cursor rulestypescriptpytest+15testlint-formatstylearch+5100/1003 days ago
dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+15setuptestlint-formatstyle+799/1003 days ago
deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1Cursor rulestypescriptnextjs+5setuptestlint-formatstyle+799/1003 days ago
markstev/mark-starter.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+14setuptestlint-formatstyle+699/1003 days ago
Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+13setuptestlint-formatstyle+799/1003 days ago
langflow-ai/langflow.cursor/rules/docs_development.mdc · 153kCursor rulespythonnode+16setupbuildtestlint-format+797/1003 days ago
TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45Cursor rulestypescriptpytest+15teststyletesting-strategysecurity+397/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack