solidjs-typescript-cursorrules-prompt-file — Cursor rule: setup
This rule guides Cursor through Solid.js and TypeScript conventions, from typed reactive state to component props. Use it when you want those practices reflected in code suggestions.
.cursor/rules/solidjs-typescript-cursorrules-prompt-file.mdcWhat solidjs-typescript-cursorrules-prompt-file does
The rule favors functional components and typed state with createSignal<T>(). It recommends defining component types, enabling strict TypeScript checks, inferring types when practical, and using interfaces for complex props.
It also covers .tsx files for JSX, typed event handlers, createContext, and Solid Router. A suggested project layout includes src/components/, src/pages/, src/utils/, and src/types/. The glob is **/*, while alwaysApply is false, so the rule is not configured to apply unconditionally. In Cursor, place it at .cursor/rules/solidjs-typescript-cursorrules-prompt-file.mdc.
What it helps with
- type reactive state in Solid.js
- define component props and event handlers
- enable strict TypeScript checks
- organize a Solid.js project structure
- add types to context and Solid Router
Example prompts for the agent
- Review this Solid.js state and use
createSignal<T>()where it fits. - Create a component with typed props and event handlers.
- Suggest a folder layout for a Solid.js app using TypeScript.
How to install solidjs-typescript-cursorrules-prompt-file
Manually: put the files in place
.cursor/rules/solidjs-typescript-cursorrules-prompt-file.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.claude/rules/solidjs-typescript-cursorrules-prompt-file.mdThe paths frontmatter field limits the files: move globs from the source into paths
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.github/instructions/solidjs-typescript-cursorrules-prompt-file.instructions.mdThe applyTo field sets which files it applies to: move globs from the source into applyTo
Manually: put the files in place
.devin/rules/solidjs-typescript-cursorrules-prompt-file.mdManually: put the files in place
.clinerules/solidjs-typescript-cursorrules-prompt-file.mdStep by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules
Questions about solidjs-typescript-cursorrules-prompt-file
How do I install solidjs-typescript-cursorrules-prompt-file in Cursor?
Place the rule at .cursor/rules/solidjs-typescript-cursorrules-prompt-file.mdc.
What does solidjs-typescript-cursorrules-prompt-file do?
It gives Cursor guidance for Solid.js with TypeScript, including component types, reactive state, context, and routing.
Does the rule always apply to every file?
Its glob is **/*, but alwaysApply: false means it is not configured for unconditional application.
Source text
solidjs-typescript-cursorrules-prompt-file.mdc · CC0-1.0
--- description: "Cursor rules for Solid.js development with TypeScript integration." globs: **/* alwaysApply: false --- // Solid.js with TypeScript .cursorrules // Prefer functional components const preferFunctionalComponents = true; // Solid.js and TypeScript best practices const solidjsTypeScriptBestPractices = [ "Use createSignal<T>() for typed reactive state", "Implement proper type definitions for components", "Utilize TypeScript's strict mode", "Use type inference where possible", "Implement interfaces for complex prop types", "Utilize utility types provided by Solid.js", ]; // Folder structure const folderStructure = ` src/ components/ pages/ utils/ types/ App.tsx index.tsx public/ index.html tsconfig.json `; // Additional instructions const additionalInstructions = ` 1. Use .tsx extension for files with JSX 2. Implement strict TypeScript checks 3. Utilize Solid Router with proper typing 4. Use type-safe context with createContext 5. Implement proper typing for event handlers 6. Follow TypeScript best practices and naming conventions 7. Use type assertions sparingly and only when necessary `;
© PatrickJS · CC0-1.0 · PatrickJS/awesome-cursorrules