kungfusheep / SublimeLinter-contrib-stylelint

this repo is no longer maintained - please see https://github.com/SublimeLinter/SublimeLinter-stylelint
MIT License
116 stars 19 forks source link

Lint different css flavors in Vue's single file components. #54

Open 2Pacalypse- opened 6 years ago

2Pacalypse- commented 6 years ago

Right now, the linter doesn't work if someone uses lang attribute other than default css in the style tag in Vue components.

Making it work for any css flavor requires changing a couple of things. Changing the selector property for vue files, eg. to support scss syntax in vue files change it to source.scss.embedded.html. And second thing is that the stylelint command that's run needs to be extended with --syntax scss.

I hardcoded these changes to my local version of this library to make it work for me, since I don't have the time to make a full PR. Of course, writing a full support for this requires a bit more work, since the flavor of css that you want to use in vue files should be configurable, or even better, automatically deduced from the lang attribute in the style tag, but I'm not sure if that's even possible.