Code Monkey home page Code Monkey logo

Comments (3)

jeddy3 avatar jeddy3 commented on September 13, 2024 6

@marco-streng Thanks for the clearly written report and for using the template.

The styled-components processors is introducing the dummyValue.

We're discouraging the use of processors in favour of the built-in syntaxes. However, it's not that clear cut as the built-in syntax for CSS-in-JS has:

I recommend trying to see if you can use stylelint on your code without the processor. If that proves problematic, you can either:

You can do the former with:

{
  "rules": { "value-keyword-case": null }
}

And the latter with:

{
  "rules": { "value-keyword-case": ["lower", { "ignoreKeywords": ["dummyValue"] }] }
}

If removing the processor does prove problematic, please can you tell us about your experience especially if you uncover bugs that are not already documented in stylelint/stylelint#4574, so that we can improve the built-in CSS-in-JS syntax in preparation for the eventual deprecation of the processors.

from stylelint-config-standard.

HosseinAgha avatar HosseinAgha commented on September 13, 2024 5

@jeddy3 I don't use styled-components processors and plugins my config is as simple as this:

module.exports = {
  extends: ['stylelint-config-standard'],
};

But I get the above error whenever I try to use a camelCase prop in my styled-component css. I think you cannot distinguish between the css attributes and js variables.

const StyledComp = styled.div`
  background: ${({ isSubPart, theme }) => !isSubPart && theme.pallette.primary};
  border-radius: 0px 4px 4px 0px;
`;

I get the following error in the above code which is wrong:
Expected "isSubPart" to be "issubpart" (value-keyword-case)

IMHO you can add this bug to stylelint/stylelint#4574 list

from stylelint-config-standard.

adammo94 avatar adammo94 commented on September 13, 2024 1

I've came across this problem as well. Any progress?

from stylelint-config-standard.

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.