-
-
Notifications
You must be signed in to change notification settings - Fork 475
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
π useFilenamingConvention false positives on number-prefixed and bracket-wrapped files #3952
Comments
tried to reproduce on
https://stackblitz.com/edit/vitejs-vite-b2fajw?file=biome.json |
That's OK, this one of those rules where the playground can't help. To create a reproduction, you can use our new CLI tool, that should help you to create very quickly repository with what you need: |
here is the reptoduction: https://github.com/sleewoo/biome-repro-1726566778076 |
In fact Biome categories the filename case as I am unsure if we should recognize |
makes sense. |
We are quite strict at the moment: Biome doesn't recognize a name prefixed with underscores, suffixed with underscores, or with double underscores as |
I think it is quite common to prefix filenames with timestamps or ISO dates, we should somehow find a way to accept this pattern. |
Here is my proposal: we assume that leading digits are in lowercase.
Implemented in #3957 @sleewoo what do you think? |
awesome! |
sorry, while on context... what about second part? have to add overrides for lot of route files with dynamic params (SolidJS) |
Fixed. |
perfect, |
Environment information
Rule name
useFilenamingConvention
Playground link
Not reproducible in playground
Expected result
There is a convenient convention to name migration files using a number prefix (usually amount of unix seconds).
Something like this:
But somehow
useFilenamingConvention
is throwing errors on these files:E.g. if creating file
123_abc.ts
, getting error:Considering this is a bug cause
biome
itself suggesting123_abc.ts
as a valid file name.Also there is an issue with bracket-wrapped files,
[id].ts
works well, however[page_id].ts
throws error:Same error for
[_id].ts
and[page-id].ts
Somehow related to #3353 and #3650
Please advise.
Thanks.
Here is my config:
Code of Conduct
The text was updated successfully, but these errors were encountered: