-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[jsx-filename-extension]: option to allow empty files #3644
Comments
jsx-filename-extension
option to allow empty files
Why? That would mean that as soon as you add code to it, you might get an error that forces you to rename it. |
The intention is that this empty file serves as a placeholder and is populated with JSX content later. If the user adds only non-JSX content, the error is justified and the file must be renamed. |
ohhh, i see - you want it to be |
Yes exactly. A empty file is kind of an edge case for such on-demand |
then yes, i think an additional option that ignores empty files would be reasonable. |
Okay, maybe I'll look into implementing it if it's not too hard. |
Given the config
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.The text was updated successfully, but these errors were encountered: