Giter VIP home page Giter VIP logo

Comments (9)

alex-sonar avatar alex-sonar commented on June 7, 2024 1

Thanks a lot - that indeed makes sense, we will look at it.

from eslint-plugin-sonarjs.

RodrigoTomeES avatar RodrigoTomeES commented on June 7, 2024 1

@yassin-kammoun-sonarsource now I on vacation and I can't provide you an real example but when I will go back to my work I will show you real code that have this problem

from eslint-plugin-sonarjs.

olafurns7 avatar olafurns7 commented on June 7, 2024 1

To bump, it would be sweet to be able to pass a regex to ignoreStrings

from eslint-plugin-sonarjs.

arianrhodsandlot avatar arianrhodsandlot commented on June 7, 2024

Would this option meet your needs?

"no-duplicate-string": ["error", { "ignoreStrings": "foo,bar,baz" }]

from eslint-plugin-sonarjs.

RodrigoTomeES avatar RodrigoTomeES commented on June 7, 2024

Hi!, thanks but I think that doesn't meet my need because Tailwind has hundreds or thousands of classes 🙈

from eslint-plugin-sonarjs.

RodrigoTomeES avatar RodrigoTomeES commented on June 7, 2024

@alexander-kamushkin-sonarsource great thanks! It would be awesome if the implementation can be made for css classes in general because in this case others CSS frameworks will work

from eslint-plugin-sonarjs.

yassin-kammoun-sonarsource avatar yassin-kammoun-sonarsource commented on June 7, 2024

@RodrigoTomeES I analyzed the snippet you provided and the rule doesn't report any issue on it. I also checked the rule implementation and it already makes an exception to all JSX attributes.

Was this a feature suggestion or are you facing an actual false positive from the rule?

from eslint-plugin-sonarjs.

man-trackunit avatar man-trackunit commented on June 7, 2024

I have the same issue. Mostly happens when for me with tailwind-merge using an array of classes like this:
CleanShot 2023-08-25 at 14 57 36@2x
And yes, it might be an abomination to pass classes as an array, but it lets prettier format them nicely.

from eslint-plugin-sonarjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.