Gatsby Cursor Rules — Free Cursor Rules Template
    Neura MarketNeura Market/Cursor
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeek
    CoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsGamesBlogVideosGuidesCoursesCommunityExtensionsTrending
    CursorRulesGatsby Cursor Rules
    Back to Rules
    Frontend

    Gatsby Cursor Rules

    April 15, 2026
    2,031 copies 0 downloads

    Code Style and Structure

    Rule Content
    You are an expert in TypeScript, Gatsby, React and Tailwind.
    
    Code Style and Structure
    
    - Write concise, technical TypeScript code.
    - Use functional and declarative programming patterns; avoid classes.
    - Prefer iteration and modularization over code duplication.
    - Use descriptive variable names with auxiliary verbs (e.g., isLoaded, hasError).
    - Structure files: exported page/component, GraphQL queries, helpers, static content, types.
    
    Naming Conventions
    
    - Favor named exports for components and utilities.
    - Prefix GraphQL query files with use (e.g., useSiteMetadata.ts).
    
    TypeScript Usage
    
    - Use TypeScript for all code; prefer interfaces over types.
    - Avoid enums; use objects or maps instead.
    - Avoid using `any` or `unknown` unless absolutely necessary. Look for type definitions in the codebase instead.
    - Avoid type assertions with `as` or `!`.
    
    Syntax and Formatting
    
    - Use the "function" keyword for pure functions.
    - Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements.
    - Use declarative JSX, keeping JSX minimal and readable.
    
    UI and Styling
    
    - Use Tailwind for utility-based styling
    - Use a mobile-first approach
    
    Gatsby Best Practices
    
    - Use Gatsby's useStaticQuery for querying GraphQL data at build time.
    - Use gatsby-node.js for programmatically creating pages based on static data.
    - Utilize Gatsby's Link component for internal navigation to ensure preloading of linked pages.
    - For pages that don't need to be created programmatically, create them in src/pages/.
    - Optimize images using Gatsby's image processing plugins (gatsby-plugin-image, gatsby-transformer-sharp).
    - Follow Gatsby's documentation for best practices in data fetching, GraphQL queries, and optimizing the build process.
    - Use environment variables for sensitive data, loaded via gatsby-config.js.
    - Utilize gatsby-browser.js and gatsby-ssr.js for handling browser and SSR-specific APIs.
    - Use Gatsby's caching strategies (gatsby-plugin-offline, gatsby-plugin-cache).
    
    Refer to the Gatsby documentation for more details on each of these practices.

    Tags

    gatsbyreactgraphqltailwindtypescript

    Comments

    More Rules

    View all

    Kechwafflesnew Cursor Rules

    C
    CODEFORYOU69

    AI DRAMA FACTORY Cursor Rules

    R
    Robert0157

    Site Cursor Rules

    R
    RaphaelVitoi

    KindnessBot Cursor Rules

    F
    foodyogi

    Neptunik Cursor Rules

    F
    fjpedrosa

    Cvcraft Cursor Rules

    C
    CedricCT

    Stay up to date

    Get the latest Cursor prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for Cursor and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.

    Neura Market

    Custom AI Systems & Services

    Our team of experienced AI builders will help build custom AI systems, workflows, and solutions for your business.

    Request custom work

    Ready-made automations for this

    Workflows from the Neura Market marketplace related to this Cursor resource

    • Automated Execution Cleanup System with n8n API and Custom Retention Rulesn8n · $9.99 · Related topic
    • Copy Folder Structure Without Files in Google Driven8n · $9.99 · Related topic
    • Receive and Analyze Emails with Rules in Sublime Securityn8n · $9.99 · Related topic
    • Extract and Structure Hair Documents to Google Sheets using Typhoon OCR and Llama 3.1n8n · $4.99 · Related topic
    Browse all workflows