Getting stylelint to work within PHPStorm, to lint SCSS files

Hi!  I had a few usage questions about the stylelint panel functionality in PHPStorm > Preferences > Languages & Frameworks > Style Sheets > Stylelint

Expected outcome, is to see validation messages when editing scss within PHPStorm.

After installing with npm install -g stylelint, I've opened up the Stylelint config panel in PHPStorm and have specified the Node interpreter and the style lint package.  I've clicked the 'enable' checkbox, and restarted the IDE.

 

First Issue

Nothing happens in scss files.  If I hit terminal and manually run, it works fine.  stylelint _file.scss yields the expected information.

 

Second Issue

How do we specify config file location? (e.g., --config-basedir parameter)

 

Thanks!

1 comment
Comment actions Permalink

>Nothing happens in scss files.  If I hit terminal and manually run, it works fine.  stylelint _file.scss yields the expected information.

works for me. What does your .stylelintrc look like, do you have any .stylelintignore file(s) in your project?

 

>How do we specify config file location? (e.g., --config-basedir parameter)

Not currently supported, please follow https://youtrack.jetbrains.com/issue/WEB-33429 for updates

0

Please sign in to leave a comment.