I'm trying to configure stylelint to only lint my CSS and/or SCSS files. I'm extending stylelint-config-recommended but by default it seems to be processing loads of other files as well as the .css and .scss ones I want to lint.
Examples of files I don't want to include:
Exmples output from the CLI
debug.log
 1:67  ×  Unknown word   CssSyntaxError
local.log
 21:21  ×  Missed semicolon   CssSyntaxError
package-lock.json
 3:21  ×  Missed semicolon   CssSyntaxError
package.json
 3:21  ×  Missed semicolon   CssSyntaxError
personal.json
 3:40  ×  Missed semicolon   CssSyntaxError
Program.cs
 1:1  ×  Unknown word   CssSyntaxError
README.md
 11:51  ×  Unclosed bracket   CssSyntaxError
reviewers.csproj
 1:1  ×  Unknown word   CssSyntaxError
reviewers.csproj.user
 1:1  ×  Unknown word   CssSyntaxError
reviewers.sln
 14:4  ×  Unknown word   CssSyntaxError
.stylelintrc
{
  "extends": "stylelint-config-recommended"
}
.stylelintignore
node_modules
bin
obj
*.js
*.map
                You can have both but you have to set your style extension to SASS or CSS only. Show activity on this post. I would recommend you change the styleExt to scss and your css files to scss because scss is a superset of css.
Stylelint by itself supports SCSS syntax very well (as well as other preprocessors' syntaxes). Moreover, it introduces some specific rules that can be used to lint SCSS, e.g. to limit. Yet stylelint is in general focused on standard CSS. stylelint-scss introduces rules specific to SCSS syntax.
A mighty, modern linter that helps you avoid errors and enforce conventions in your styles.
Looks like you can use a "exclusion" glob like this:
.stylelintignore
node_modules
bin
obj
*.*
!*.css
!*.scss
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With