-
Notifications
You must be signed in to change notification settings - Fork 61
Linting .css files #27
Comments
Same here:
Unfortunately no source file. So I don't know where to fix this. |
@linonetwo Are you running this processor on a @JonWallsten your issue is that you're using |
I'll mark this as wontfix since you shouldn't run this processor when linting |
The problem is that I didn't run stylelint by myself, I just run it via vscode's plugin, so it will run it against all file I guess. |
I've also came accross with this problem when linting I think
|
Hmmm... I'm not quite an expert on stylelint, but I just searched a bit, and could it be true that there is no way to specify different stylelint configurations for different file types? Because yeah, this processor as of right now only supports Javascript files. @AntonioRedondo if it's true there is currently no way to specify different configs based on a regex, maybe you should open an issue with the Stylelint repo? And yeah it definitely wouldn't hurt slightly updating the README to reflect that we truly only support Javascript files if that isn't clear enough, feel free to submit a PR with the clarifications you feel are needed :). |
The way I know of is to use the cli with the config flag:
However I think the node implementation of stylelint just looks for the standard config files. |
Yeah that's definitely a possibility. But I guess that wouldn't work for for example text editor plugins. You would need a webpack'ish implementation of test: /\.jsx?/,
loader: [
stylelint,
config: { ... }
],
test: /\.css/,
loader: [
stylelint,
config: { ... }
] implemented I guess, which would be a stylelint issue / PR that should be opened there. |
Yeah. Nothing we can do about it anyway. |
Is there a way to configure stylelint differently for css and js files in the stylelint section of package json or is the only option to write a different config file and run stylelint twice? |
Currently Stylelint (as far as I know) doesn't allow putting in different configs for different files in an easy way, you could either get this to happen by contributing to #163 so we can get that merged, or helping get that implemented for Stylelint itself |
I ended up using the
|
Recently, we released v1.8.0(#267) which supports the option |
Seems stylelint-processor-styled-components will cause stylelint fail in .css file
The text was updated successfully, but these errors were encountered: