WordPress-Coding-Standards / stylelint-config-wordpress

WordPress shareable config for stylelint Note: Migrating to Gutenberg repo:

Home Page:https://github.com/WordPress/gutenberg/pull/22777

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CssSyntaxError on screenshot.jpg

brianfreytag opened this issue · comments

I was attempting to load this in my custom theme. One weird thing I noticed is that it's throwing a CssSyntaxError on my screenshot.jpg file.

./node_modules/.bin/stylelint .

screenshot.jpg
 421:11  ✖  Unclosed string   CssSyntaxError

My .stylelintrc.json:

{
  "extends": [
    "stylelint-config-wordpress/scss"
  ]
}

My .stylelintignore

/vendor/
/node_modules/

*.json
*.lock
*-invalid.*

I'm not sure why it would be testing image files out of the box. I haven't tested with other file extensions, but I'd hate to think that I'd have to add an ignore for every image file extension I might use.

Thanks, I cannot find the issue in the stylelint repo, but using the . as is possible with ESLint and a few other CLI tools it not currently possible with stylelint

If you surround the glob in quotes and use a syntax as noted in the docs I think it should resolve this issue for you.

https://stylelint.io/user-guide/usage/cli

Once I find the issue in the stlyelint repo I'll link back to it here, I think it's possibly got a fix coming in the not too distant future which will be great

Closing this issue, this repo is being migrated to Gutenberg repo, see #22777