Skip to content
Discussion options

You must be logged in to vote

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

language js

jsx_attribute() as $s where {
  or {
    $s <: r".*-\[#[a-fA-F0-9]{1,6}\].*",
  },
  register_diagnostic(
    span = $s,
    message = "Avoid custom Tailwind colors, ie `text-[#RRGGBB]`. Use a design-token class instead.",
  )
}

Replies: 3 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
8 replies
@lukepighetti
Comment options

@lukepighetti
Comment options

@lukepighetti
Comment options

@lukepighetti
Comment options

Answer selected by morgante
@morgante
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants