Oops. I merged stylelint stuff but if you select a framework besides Bootstrap it currently clears out some Sass files. Those files need at least a comment at the top, so will get that fixed.
FWIW, I’m getting this error when I run yarn build:
Error: Failed because of a stylelint error.
at linterSuccess (/Users/[…]/node_modules/stylelint-webpack-plugin/lib/run-compilation.js:34:14)
error Command failed with exit code 1.
But there are no errors when I run yarn run lint:styles:
yarn run v0.27.5
$ stylelint resources/assets/styles/**/*.{css,sass,scss,sss,less}
Done in 2.43s.
Using
Sage 9.0.0-beta.3
Stylelint 7.12
Node 6.9.4
Not sure what’s going on, but commenting out the Stylelint plugin as @Jake_Dickinson suggested fixes it.
I tried updating to the following but still got the error:
Thanks, that saved my day. Got to wonder why this is not in the default Webpack config. If the build process fails we should see helpful error message by default @ben wouldn’t that make sense?
Excuse me, Is there a way to disable this garbage? I’m sorry but I really could give a crap if there’s an extra space at the end of the line or a comment doesn’t have a line before it. WTF
How do I disable this at least for the time being while I’m developing my theme? I HATE this stylelint thing and I don’t know a lot about using packages and such so I’m not sure how to just remove it if that can even be done?
I’m importing UIKit CSS which I have no control over how they make their code and this is giving me all sorts of errors about Unexpected empty line before at-rule
Appreciate the pointer, as I was stuck on this for a couple of hours.
Long time Sage developer on v7 and v8, but new to Sage 9 and the yarn build process.
Diagnosing this was obscure at best. I know my scss syntax well, but the lack of stylelint errors left me stumped.
Was also not aware of yarn run lint:styles, which gave pretty clear direction.
I would suggest a touch of documentation here on styelint so that a Sage 9 newbie doesn’t get stuck. And obviously if there is a way to output stylint errors in the yarn build process, that would be great.
I also had that error, thanks for the yarn run lint:styles command, it help me see the problem. Zero values for css styles cause mine to break and the normal yarn build command couldn’t point out the errors, thanks again.
anyway to make rules only apply for ‘watching’ - ie locally or on staging? I can see how this strictness may be useful for production but when you’re fleshing out scss files it blocks the whole site with the black screen.