Skip to main content
rule

angular-typescript-cursorrules-prompt-file — Cursor rule: guide

Sets Angular 18 and TypeScript standards in Cursor, capping nesting depth at two levels and enforcing Jest test conventions.

Install into Cursor · Manually: put the files in place All methods and platforms ↓
.cursor/rules/angular-typescript-cursorrules-prompt-file.mdc
Open on GitHub

What angular-typescript-cursorrules-prompt-file does

This rule configures Cursor for Angular 18 projects using TypeScript and Jest. It instructs the assistant to follow .eslintrc.json, .prettierrc, .htmlhintrc, and .editorconfig. When refactoring, the model must keep existing JSDoc comments and import statements intact.

Structural boundaries are strict. Functions cannot exceed 50 executable lines or 4 parameters. Nesting stops at 2 levels deep. Lines must fit within 80 characters. In addition, the rule demands using forNext from libs/smart-ngrx/src/common/for-next.function.ts instead of standard for or forEach loops. Without that exact helper file in your codebase, generated iterations will fail.

Extraneous conversational filler is banned. If Cursor lacks information to answer a request, it must ask directly rather than hallucinate solutions.

What it helps with

  • restrict code nesting to two levels
  • keep functions under 50 lines and four arguments
  • preserve JSDoc comments during Angular refactoring
  • generate tests targeting Jest and Angular 18

Example prompts for the agent

  • Create an Angular 18 login component with reactive form validation
  • Refactor this data service so nesting does not exceed two levels
  • Write a Jest test suite for the authentication guard

How to install angular-typescript-cursorrules-prompt-file

Manually: put the files in place

.cursor/rules/angular-typescript-cursorrules-prompt-file.mdc

Frontmatter: description, globs, alwaysApply

Step by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules

Questions about angular-typescript-cursorrules-prompt-file

How do I install angular-typescript-cursorrules-prompt-file in Cursor?

Add the configuration file at .cursor/rules/angular-typescript-cursorrules-prompt-file.mdc in your repository root. It matches all files via the **/* pattern.

Which Angular version does this rule target?

It targets Angular 18 with TypeScript and mandates Jest as the test runner.

Does this rule require a specific repository dependency?

Yes. It points standard iteration to libs/smart-ngrx/src/common/for-next.function.ts. You must remove that clause if your project does not use smart-ngrx.

Source text

angular-typescript-cursorrules-prompt-file.mdc · CC0-1.0
---
description: "Cursor rules for Angular development with TypeScript integration."
globs: **/*
alwaysApply: false
---
you are an expert Angular programmer using TypeScript, Angular 18 and Jest that focuses on producing clear, readable code.

you are thoughtful, give nuanced answers, and are brilliant at reasoning.

you carefully provide accurate, factual, thoughtful answers and are a genius at reasoning.

before providing an answer, think step by step, and provide a detailed, thoughtful answer.

if you need more information, ask for it.

always write correct, up to date, bug free, fully functional and working code.

focus on performance, readability, and maintainability.

before providing an answer, double check your work

include all required imports, and ensure proper naming of key components

do not nest code more than 2 levels deep

prefer using the forNext function, located in libs/smart-ngrx/src/common/for-next.function.ts instead of for(let i;i < length;i++), forEach or for(x of y)

code should obey the rules defined in the .eslintrc.json, .prettierrc, .htmlhintrc, and .editorconfig files

functions and methods should not have more than 4 parameters

functions should not have more than 50 executable lines

lines should not be more than 80 characters

when refactoring existing code, keep jsdoc comments intact

be concise and minimize extraneous prose.

if you don't know the answer to a request, say so instead of making something up.

© PatrickJS · CC0-1.0 · PatrickJS/awesome-cursorrules

Similar IDE rules

All IDE rules for Frontend and UI →

From the same set210

ascii-simulation-game-cursorrules-prompt-file A Cursor rule that frames an observer-only ASCII simulation: 10x10 grid, turn-based play, logs for nearly everything. Useful if you are building something in the spirit of Conway's Game of Life. ★ 41,024repo stars anti-sycophancy-code-discipline-cursorrules-prompt-file This Cursor rule stops the assistant from sycophantic approval, fake API signatures, and unverified reviews. It keeps refactoring disciplined and forces evidence-based checks. ★ 41,024repo stars anti-overengineering This Cursor rule keeps edits tied to the request and avoids extra abstractions, dependencies, and broad file rewrites. ★ 41,024repo stars ankra-cli A Cursor rule that tells the agent how to drive the Ankra CLI: clusters, stacks, Helm releases and tokens. ★ 41,024repo stars angular-novo-elements-cursorrules-prompt-file This rule guides Cursor through Angular work with Novo Elements, favoring small diffs, checks, and tests. It fits projects built with standalone components. ★ 41,024repo stars android-jetpack-compose-cursorrules-prompt-file A Cursor rule that steers the agent through Android development with Jetpack Compose: architecture, state, tests. ★ 41,024repo stars alpha-skills-quant-factor-research Sets up Cursor as a quantitative researcher to design, evaluate, and backtest alpha factors. Supports US, Hong Kong, and China A-share equity markets. ★ 41,024repo stars ai-agent-specialist This Cursor rule sets guidance for TypeScript, React, and Node.js, covering architecture, tests, security, errors, and Git. It suits projects that need WHY explanations. ★ 41,024repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor