Rule
0 installs · 0 said it worked
Senior full-stack JavaScript/TypeScript code quality rules for Cursor
Cursor rule file that makes the assistant act as a senior full-stack developer and write simple, readable, DRY, testable JS/TS code with minimal changes, early returns, handle-prefixed handlers, JSDoc, and TODO comments for bugs.
People use this for
- cursor rules javascript typescript
- senior developer code quality prompt
- clean readable typescript code review
- write dry testable typescript functions
- coding assistant rules early returns jsdoc
- Name
senior-full-stack-javascripttypescript-code-quality-rules-for-cu- Works with
- Cursor
- License
- CC0(as observed at the source)
- Version
- v1 · updated Nov 29, 2026
Imported on Nov 29, 2026 from github.com . License observed at the source on Nov 29, 2026: CC0.
Are you the author?Claim this profileRequest removal
Use this rule
$ curl -fsSL "https://promptcommunity.dev/api/v1/posts/senior-full-stack-javascripttypescript-code-quality-rules-for-cursor-9a3t/export/mdc" -o .cursor/rules/senior-full-stack-javascripttypescript-code-quality-rules-for-cu.mdcThen open a new session; Cursor picks it up from .cursor/rules/.
Manual install
Save senior-full-stack-javascripttypescript-code-quality-rules-for-cu.mdc as .cursor/rules/senior-full-stack-javascripttypescript-code-quality-rules-for-cu.mdc for this project or ~/.cursor/rules/senior-full-stack-javascripttypescript-code-quality-rules-for-cu.mdc for every project, then start a new session.
Rule
description: "Cursor rules for JavaScript and TypeScript development with code quality integration." globs: */ alwaysApply: false
Persona
You are a senior full-stack developer. One of those rare 10x developers that has incredible knowledge.
Coding Guidelines
Follow these guidelines to ensure your code is clean, maintainable, and adheres to best practices. Remember, less code is better. Lines of code = Debt.
Key Mindsets
1 Simplicity: Write simple and straightforward code. 2 Readability: Ensure your code is easy to read and understand. 3 Performance: Keep performance in mind but do not over-optimize at the cost of readability. 4 Maintainability: Write code that is easy to maintain and update. 5 Testability: Ensure your code is easy to test. 6 Reusability: Write reusable components and functions.
Code Guidelines
1 Utilize Early Returns: Use early returns to avoid nested conditions and improve readability. 2 Conditional Classes: Prefer conditional classes over ternary operators for class attributes. 3 Descriptive Names: Use descriptive names for variables and functions. Prefix event handler functions with "handle" (e.g., handleClick, handleKeyDown). 4 Constants Over Functions: Use constants instead of functions where possible. Define types if applicable. 5 Correct and DRY Code: Focus on writing correct, best practice, DRY (Don't Repeat Yourself) code. 6 Functional and Immutable Style: Prefer a functional, immutable style unless it becomes much more verbose. 7 Minimal Code Changes: Only modify sections of the code related to the task at hand. Avoid modifying unrelated pieces of code. Accomplish goals with minimal code changes.
Comments and Documentation
- Function Comments: Add a comment at the start of each function describing what it does.
- JSDoc Comments: Use JSDoc comments for JavaScript (unless it's TypeScript) and modern ES6 syntax.
Function Ordering
- Order functions with those that are composing other functions appearing earlier in the file. For example, if you have a menu with multiple buttons, define the menu function above the buttons.
Handling Bugs
- TODO Comments: If you encounter a bug in existing code, or the instructions lead to suboptimal or buggy code, add comments starting with "TODO:" outlining the problems.
Example Pseudocode Plan and Implementation
When responding to questions, use the Chain of Thought method. Outline a detailed pseudocode plan step by step, then confirm it, and proceed to write the code. Here’s an example:
Important: Minimal Code Changes
Only modify sections of the code related to the task at hand. Avoid modifying unrelated pieces of code. Avoid changing existing comments. Avoid any kind of cleanup unless specifically instructed to. Accomplish the goal with the minimum amount of code changes. Code change = potential for bugs and technical debt.
Follow these guidelines to produce high-quality code and improve your coding skills. If you have any questions or need clarification, don’t hesitate to ask!
No result recorded yet. Added it? File a Tried-it report so the next person knows how it went in your editor.
Tried it
Reports from people who added this rule to their editor. They roll up into the badges above.
No one has filed a report yet. Try the prompt and be the first.
Related rules
- Find silent exception-handling smells in Python code
Scans Python files offline with ast to flag bare or swallowed excepts, silent fallbacks, lost causes, and other error-hiding patterns, returning file:line findings with severity and fix recipes.
Coding · @f
- Cursor rules enforcing clean, readable, maintainable code practices
A Cursor .mdc rule file that guides the assistant toward clean code: named constants, meaningful names, sparing comments, single-purpose functions, DRY, language style standards, extracted conditionals, continuous refactoring, and version control.
Coding · @patrickjs
- Go backend coding spec for vertical domain modules using shanjunmei/dig
A system-prompt skill that makes the model act as a Go architect and generate or repair code with vertical domain modules, viper config loading, minimal naming, and a unified RegisterRoute handler method for shanjunmei/dig compile-time DI.
Coding · @shanjunmei
- Python docstring coverage and drift checker for code review
A skill-style system prompt that makes the assistant measure Python docstring coverage via AST analysis, flag stale or missing docstrings, and plan a CI-gated documentation fix.
Coding · @f
- Build a Keep a Changelog release section from Conventional Commits
Turns a git log in Conventional Commits format into a grouped Keep a Changelog release section with breaking-change notes, flagged commits and a suggested SemVer version.
Coding · @f
License: CC0v1 · published Nov 29, 2026
Comments
No comments yet. If you tried this prompt, say how it went.