Skip to content

Automatic file validation for components in src/pages #3045

@calcsam

Description

@calcsam

Add regex validation to make sure files in src/pages export React components. Throw error otherwise. Programmatically enforce language in the docs: #3011

A cheap way of doing this is to make sure files contain at least two statements:

(1) an uppercase React
(2) export default or module.exports

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueIssue that doesn't require previous experience with Gatsby

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions