Skip to main content
rule

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.

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

What 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.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 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

Similar IDE rules

All IDE rules for Frontend and UI →

From the same set210

sveltekit-tailwindcss-typescript-cursorrules-promp Defines project conventions for SvelteKit 2, Tailwind CSS, and TypeScript in Cursor. It keeps code consistent by enforcing typed components and proper directory structure. ★ 41,024repo stars sveltekit-restful-api-tailwind-css-cursorrules-pro This rule gives Cursor project guidance for SvelteKit, REST APIs, Tailwind CSS, testing, and file management. Use it to keep those practices in view while working on a project. ★ 41,024repo stars svelte A Cursor rule that steers the agent toward Svelte conventions: component structure, reactivity, stores, SvelteKit routing and tests. Useful when the agent writes or edits Svelte code. ★ 41,024repo stars svelte-5-vs-svelte-4-cursorrules-prompt-file Guides Cursor to write Svelte 5 code instead of Svelte 4, adopting runes like $state and $derived, native event attributes, and snippets. ★ 41,024repo stars solidjs-tailwind-cursorrules-prompt-file A Cursor rule that tells the agent how to write Solid.js code with Tailwind CSS: signals, utility classes, folder layout. ★ 41,024repo stars solidity-react-blockchain-apps-cursorrules-prompt- This Cursor rule guides Solidity contracts and React apps that connect to blockchain services. Use it when reviewing contract safety or Web3 frontend code. ★ 41,024repo stars solidity-hardhat-cursorrules-prompt-file A Cursor rule that turns the AI assistant into a Solidity and smart contract security expert, with Hardhat-based testing and gas work. ★ 41,024repo stars solana-wallet-aware This Cursor rule adds wallet and transaction safeguards to Solana code, from isolated signing to tests required before live transactions. ★ 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