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:
- stylelint 9.1.3
- stylelint-config-recommended 2.1.0
- stylelint-config-styled-components 0.1.1
- stylelint-processor-styled-components 1.3.1
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
stylelint './src/**/*.js' --formatter verbose
and it does list the files it should check, but they all return OK (green) even if some of them have obvious problems. – Cymbiform