question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature request] Lint values in a object

See original GitHub issue

Is your feature request related to a problem? Please describe. Can’t lint values in an object passed to a callee.

My list of callees: ["clsx", "cva"].

This doesn’t work:

const buttons = cva({
  variants: {
    variant: {
      primary: "bg-white text-black font-bold px-4",
      secondary: "bg-black text-white font-semibold px-5",
    },
  },
});

This does:

const buttons = cva({
  variants: {
    variant: {
      primary: clsx("bg-white text-black font-bold px-4"),
      secondary: clsx("bg-black text-white font-semibold px-5"),
    },
  },
});

Describe the solution you’d like I would like for the first example to work.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dipsaus9commented, Dec 14, 2022

Found the issue in the example bg-red is not a valid Tailwind class. This should be a gradient of red, for example red-50. If added red-50 eslint will give you an error.

0reactions
francoismassartcommented, Dec 29, 2022

Fixed in the latest release v3.8.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lint unused values · Issue #8822 · helm/helm - GitHub
Is this a request for help?: Is this a BUG REPORT or FEATURE REQUEST? (choose one): Feature Request Version of Helm and Kubernetes:...
Read more >
Lightning Lint tool doesn't like Object.values() method
I have looked through the related documents but still I don't understand what is wrong with getting values list from map using Object....
Read more >
JavaScript Type Linting - Medium
All non-primitive values are objects. These are mutable and are compared by reference. The two simple types — string and number — have...
Read more >
CI Lint API - GitLab Documentation
The CI lint returns an expanded version of the configuration. The expansion does not work for CI configuration added with include: local ,...
Read more >
Working with Rules - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found