I'm installing stylelint-config-styled-components
on a react project.
When I execute npm run lint:css
(or use the stylelint command directly through the CLI) I don't get any results. I have intentionally put in extra spaces and duplicate style declarations, so there should definitely be some feedback from stylelint that I've broken rules. However, I'm getting nothing, not even an error message. Any ideas?
I have installed the following packages:
I am using the following script in package.json
:
"scripts": {
//other scripts
"lint:css": "stylelint './src/**/*.js'"
}
The contents of my .stylelintrc
:
{
"processors": ["stylelint-processor-styled-components"],
"extends": [
"stylelint-config-recommended",
"stylelint-config-styled-components"
]
}
My project's file structure (I have tried running the command directly on files with the same result, so I don't think it's an issue with it not being able to find the .js files)
-root
-.stylelintrc
-src
-Components
-Directory
-ThingIWantLinted.js
-AnotherDirectory
-AnotherThingTolint.js
Also got this issue. After upgraded to stylelint 9.4.0
now lint result show as expect.
Reference issue. https://github.com/stylelint/stylelint/pull/3261
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