TypeScript Node.js React Vite .cursorrules prompt file
About .cursorrules prompt file
What you can build
TypeScript IDE Plugin: Develop a plugin for popular IDEs that enforces the code styles and structures outlined in the prompt, providing real-time feedback and suggestions to developers.
React Component Library: Create a library of TypeScript React components built with Tailwind CSS, adhering to the style and structure guidelines, with features such as responsive design and performance optimization.
Web Application Boilerplate: Design a boilerplate for web applications using TypeScript, Node.js, React, Vite, and TanStack Query/Router. The boilerplate would include pre-configured settings for ESLint, Prettier, and TypeScript interfaces.
TypeScript Code Analyzer: Build a tool that analyzes TypeScript codebases for adherence to the provided constraints and guidelines, offering improvement suggestions and refactoring options.
Interactive TypeScript Tutorial: Develop an online platform that offers interactive tutorials and exercises for learning to code efficiently in TypeScript, focusing on the principles enumerated in the prompt.
State Management Library: Create a lightweight state management library optimized for performance, utilizing efficient data structures and algorithms as suggested by the prompt.
Developer Documentation Generator: Build a service that automatically generates developer documentation from TypeScript codebases, ensuring consistent use of interfaces and maps.
Code Optimization Service: Offer a service that scans projects to identify and suggest optimizations for network requests, data fetching strategies, and rendering processes in TypeScript applications.
Tailwind CSS Templates: Design a set of Tailwind CSS templates specifically for TypeScript and React projects, emphasizing responsiveness and a mobile-first design approach.
Functional Programming Workshop: Organize a workshop or series of webinars teaching functional programming patterns in TypeScript, aligned with the guidelines in the prompt.
Benefits
- Emphasizes functional programming with TypeScript and avoids classes for clean, modular, and efficient code.
- Enforces strict formatting and naming conventions for consistency and readability across the codebase.
- Prioritizes performance by encouraging the use of immutable data structures and efficient strategies for data fetching and state management.
Synopsis
Front-end developers can use this prompt to build efficient, scalable web applications with TypeScript, React, and Tailwind, following best practices in functional programming and performance optimization.
Overview of .cursorrules prompt
The .cursorrules file provides guidelines and constraints for writing TypeScript code in a project using technologies such as Node.js, React, Vite, TanStack Query, TanStack Router, and Tailwind. It emphasizes maintaining existing code and formatting, preferring functional and declarative programming patterns, and using descriptive variable names. It outlines a file structure for components, promotes the use of TypeScript interfaces over types, and advocates for functional components. It also specifies using Tailwind for styling and encourages performance optimizations like efficient data handling and rendering strategies. The file enforces certain naming conventions and syntax rules to ensure consistency and maintainability in the codebase.