💅 useNamingConvention
- should support distinguishing based on TypeScript types
#6522
yairEO
started this conversation in
Rule suggestion
Replies: 2 comments 10 replies
-
I will move this into a discussion, as an idea. The rule is inspired from eslint typescript rule. |
Beta Was this translation helpful? Give feedback.
3 replies
-
One of the reason I didn't implement this feature is because of its low usage according to my investigation on GitHub. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Environment information
Rule name
useNamingConvention
Playground link
https://biomejs.dev/playground/?lintRules=useNamingConvention&code=ZQB4AHAAbwByAHQAIABjAG8AbgBzAHQAIABmAG8AbwAgAD0AIAAxADsAIAAvAC8AIABzAGgAbwB1AGwAZAAgAGIAZQAgAEMATwBOAFMAVABBAE4AVABfAEMAQQBTAEUACgBlAHgAcABvAHIAdAAgAGMAbwBuAHMAdAAgAGIAYQByACAAPQAgAHsAYQA6ADEAfQA7ACAAIAAvAC8AIABzAGgAbwB1AGwAZAAgAGIAZQAgAEMATwBOAFMAVABBAE4AVABfAEMAQQBTAEUACgBlAHgAcABvAHIAdAAgAGMAbwBuAHMAdAAgAGQAbwBTAHQAdQBmAGYAIAA9ACAAKAApACAAPQA%2BACAAewAuAC4ALgB9ACAALwAvACAALwAvACAAVgBhAGwAaQBkACAAZgB1AG4AYwB0AGkAbwBuACAAYwBvAG4AcwB0ACAAbgBhAG0AZQAKAAoALwAvACAAUgBlAGEAYwB0AC0AcwBwAGUAYwBpAGYAaQBjAAoAZQB4AHAAbwByAHQAIABjAG8AbgBzAHQAIAB1AHMAZQBXAGgAYQB0AGUAdgBlAHIAIAA9ACAAKAApACAAPQA%2BACAAewAgAC4ALgAuACAAfQA7ACAALwAvACAAVgBhAGwAaQBkACAAcgBlAGEAYwB0ACAAaABvAG8AawAgAGMAbwBuAHMAdAAgAG4AYQBtAGUAIABPAE4ATABZACAAaQBmACAAaQB0ACAAcwB0AGEAcgB0AHMAIAB3AGkAdABoACAAdABoAGUAIAB3AG8AcgBkACAAIgB1AHMAZQAiAAoAZQB4AHAAbwByAHQAIABjAG8AbgBzAHQAIABUAGUAcwB0AEMAbwBtAHAAbwBuAGUAbgB0ACAAPQAgACgAKQAgAD0APgAgAG4AdQBsAGwAOwAgAC8ALwAgAFYAYQBsAGkAZAAgAGMAbwBuAHMAdAAgAG4AYQBtAGUACgBlAHgAcABvAHIAdAAgAGMAbwBuAHMAdAAgAEMAbwBtAHAAbwBuAGUAbgB0ACAAPQAgAHcAaQB0AGgATQBvAGQAYQBsACgAVABlAHMAdABDAG8AbQBwAG8AbgBlAG4AdAApADsAIAAvAC8AIABWAGEAbABpAGQAIABjAG8AbgBzAHQAIABuAGEAbQBlAA%3D%3D&ruleDomains.react=all&ruleDomains.test=recommended
Expected result
ESLINT has the
types
property which Biome lacks, and it is very powerful.I am a React (frontend) developer and below are some scenarios I need linting for my team:
The current way
useNamingConvention
is limiting in very common React projects and cannot work to enforce primitive (by type) global constants to be inCONSTANT_CASE
, while enforcing other React specific naming conventions.Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions