Skip to content

[jsx-filename-extension]: option to allow empty files #3644

Closed
@silverwind

Description

@silverwind

Given the config

rules:
  react/jsx-filename-extension: [2, {allow: as-needed]}]

a file that is empty or contains only comments triggers the rule, for example a .jsx file with:

// Put your components here

I think a option to allow empty files when as-needed is specified would be ideal for this use case, not sure whether it should be the default, but I think it could be.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions