simple regex matching biome linter #661
Answered
by
lukepighetti
lukepighetti
asked this question in
Q&A
|
struggling to implement a simple regex matching linter for biome. the goal is to ban custom tailwind colors like export function StyledHeader({ title }: StyledHeaderProps) {
const tailwindClass = "text-[#FF0000]" // < expecting to highlight this
return <h1 className={"text-5xl text-[#FF0000]"}>{title}</h1> // < and this
}the regex pattern is known to work via regex101.com, but for some reason when i try running i can get it to work when capturing does anyone happen to have an example of a very simple regex matching grit file for biome linter? |
Answered by
lukepighetti
Oct 6, 2025
Replies: 3 comments 8 replies
0 replies
|
i think the reason why i'm getting multiple hits is because it's capturing multiple parts of the AST tree, ie
i also tried binding to a JS string literal but that didn't work |
0 replies
|
You could try using an AST node: |
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


was able to get our lint checks down from 17s to 1.2s by using
jsx_attributeas found here