-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for regular expressions in ignore #19
Comments
Thank you for your support! |
Great, thanks!
Ah I didn't think of that. I'll investigate this. |
@jroebu14 If you are unaware, you no longer need to use Some thoughts: It would be nice to have regex but in the value location. Example: width: 10emin; This is a shorthand for: width: calc(10 * var(--emin)); This is a very simple postcss plugin to make using the various element units more enjoyable. |
Hi @brandonkal I think I still need to use const example = css`
${({ height }) => height ? `height: ${height};` : ''}
width: ${width};
`; |
That looks quite verbose. Styled Components already handles falsish values so I would write the above like this: const example = css`
height: ${({ height }) => height};
width: ${width};
`; I haven't had any issues with the above. Stylelint will see that last declaration value as "${width}" rather than some placeholder provided by However, even with For that, I would recommend my csstyper eslint plugin which uses csstree and Typescript to infer and validate values in css and styled templates. You can also see I've made some minor changes to allow For instance, switching to const hVar = '100%'
<Component style={{ color: 'whiteee', fontSize: 12, height: hVar }} (one error reported above) |
Hi there! My team is using a Less |
Fixed in 2.1.0 |
Hi, thanks for creating this useful plugin!
Is there any chance of passing in a regular expression to the ignore option?
My reason for doing so is that
stylelint-processor-styled-components
outputsstyled-components
mixins as invalid properties e.g.-styled-mixin0
,-styled-mixin1
,-styled-mixin2
which then fails validation when using this plugin.If I could do something like below that would be great
The text was updated successfully, but these errors were encountered: