-
Notifications
You must be signed in to change notification settings - Fork 3
Allow specifying syntax #69
Comments
That shouldn't be a problem no, see styled-components/stylelint-processor-styled-components#171 and styled-components/stylelint-processor-styled-components#170 We initially thought so too but were enlightened by @jeddy3 from Stylelint. If you have any other information than this feel free to share it but otherwise I'm closing this |
I'm getting lost in docs. My inline comments are triggering errors when I use this loader, how can I solve it then? When running stylelint manually, I can fix it by specifying |
The issue styled-components/stylelint-processor-styled-components#170 that you are linking simply explains the fact that the |
I'm afraid I might have been wrong. The default PostCSS parser supports the interpolation and nesting I tried in styled-components/stylelint-processor-styled-components#170 (comment), but I don't think it supports inline comments. As such, users might need to set the syntax to SCSS to use inline comments. |
Hmm okay @jeddy3. But if I recall correctly you said that setting the 'syntax' option in config simply didn't exist and it was only a CLI option? Or is that misremembered by me / outdated information? |
It cannot be specified in the stylelintrc config file, but it can be in the options of the API call, as documented here. |
Yes of course, @cdauth if you'd like to submit a PR I'll be happy to review it and publish a new version. But I have a lot of things going on so I won't have the time to implement it myself at the moment |
When using stylelint-custom-processor-loader with styled-components, the
syntax
parameter needs to be set toscss
, otherwise some language features will not work (such as inline comments, see styled-components/stylelint-processor-styled-components#195).It would be nice if the
syntax
parameter could be specified in the config object of the loader.The text was updated successfully, but these errors were encountered: