-
-
Notifications
You must be signed in to change notification settings - Fork 499
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
💅 useNamingConvention
can suggest useless fix
#1786
Comments
I suppose we should ignore identifiers that aren't UTF-8 |
AFAIK, Korean characters can be represented as UTF-8. Not 100% sure, but most likely concepts such as camel casing and such only apply to latin scripts. |
Note that Koreans mostly do not prefer to write variable names in Korean, except when they have to communicate with outside services, written by who prefers to do (mostly government ones). |
@ematipico I was thinking we could change the return type of |
I'm not very familiar with the rule unfortunately |
I am not sure how we should handle this. |
My reasoning was that these scripts might not have a case at all, so giving them a case variant of |
I didn't check the implantation of the eslint rule, however the rule seems to treat these characters as both uppercase and lowercase character. Otherwise, what do you suggest? What about mixing latin characters with such characters? EDIT: We could create a new case named export const data = {
안녕하세요: 1, // accepted
안_녕_하_세_요: 2, // rejected
a안b녕c하d세e요f: 2, // rejected
} @xnuk Could this change fulfills your needs? |
Seems okay for now, as long as Biome does not suggest useless fix for + Korean has word spacing, so for example |
If some users request it, we could add a new case for unicase characters with underscores. |
Environment information
Used
biome-linux-x64
binary from the release (sha256sum:adf8a6029f43ac6eb07c86519f7ff08875915acec082d0be9393888044806243
)Rule name
lint/style/useNamingConvention
Playground link
https://biomejs.dev/playground/?lintRules=all&code=ZQB4AHAAbwByAHQAIABjAG8AbgBzAHQAIABkAGEAdABhACAAPQAgAHsAIABIxVWxWNU4wZTGOgAgADEAIAB9AAoA
Expected result
Currently it shows this:
Since the suggested fix is same as original, the message should be removed or replaced to something else. Disabling the lint could be an option.
Code of Conduct
The text was updated successfully, but these errors were encountered: