Multiple conventions for a selector? #4642
Replies: 2 comments
-
For better DX in finding the answer, you can "suggest an answer" (add a new comment), mark the question as answered and close it as completed instead (you'd have to reopen the discussion) |
Beta Was this translation helpful? Give feedback.
0 replies
-
I could use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The project I'm working on has a few conventions when it comes to object key naming. One in particular is giving me hassle.
We have a type that looks a bit like this:
export type QueryMediaQueryParams = { $filter: string $orderby?: string }
I can get biome to accept this by using a matcher,
\\$(.+)
, but I then can't get it to accept type or object members that aren't prefixed with $.Is there a way to support multiple conventions on a selector, such that it'll accept formats both with and without the prefixed $? Obviously I could define the formats using regex, but then we'd end up with some quite unhelpful errors when the linter finds them.
Edit: Found the answer after re-reading the docs a number of times. For the benefit of future google searches,
\\$(.+)|(.+)
works for this kind of purpose.Beta Was this translation helpful? Give feedback.
All reactions