Closed sampotts closed 6 years ago
I created a repository to try and reproduce the issue and couldn't. The src/index.js
file is the value of main
in the package.json
, so this would seem like a bug somewhere else.
https://github.com/shannonmoeller/repro-stylelint-config-prettier-12
What versions of Node.js and stylelint are you using? Any chance you could delete your node_modules
dir and package-lock.json
file, then run npm i
, and try linting again?
Will give that a try in the AM. As far as I’m aware, latest node, latest stylelint but I’ll confirm in the morning (I’m in Australia).
Cheers Sam
On 15 Mar 2018, at 12:44 am, Shannon Moeller notifications@github.com wrote:
I created a repository to try and reproduce the issue and couldn't. The src/index.js file is the value of main in the package.json, so this would seem like a bug somewhere else.
https://github.com/shannonmoeller/repro-stylelint-config-prettier-12
What versions of Node.js and stylelint are you using? Any chance you could delete your node_modules dir and package-lock.json file, then run npm i, and try linting again?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Node is 9.8.0 Stylelint is 9.1.3
Deleted yarn.lock
and package-lock.json
(I use yarn primarily) and still the same result (had to cp
index.js up a level). I deleted node_modules
and tried yarn
and npm install
with the same result. Deleted node_modules
both times too. It's fine, I can cp index.js ../
for now
Thanks for trying all of that. Having to modify the content of node_modules
is no good. I'll add the plugins you listed into the repro repo and see if I can replicate. My guess is one of the plugins you're using is doing something weird.
It wouldn't surprise me 👍
I updated the repo to include those plugins, but I still can't reproduce the issue:
Is the project your working on open source? Can I see the code?
Sure - it's here: https://github.com/sampotts/plyr/tree/beta
Are you using the local install of stylelint, or a global one? I don't see it in your npm scripts or gulpfile.
(Need to head home. Back online later.)
Local - happy to go on your recommendation though. I was just keen for contributors to be using stylelint. I'm using it with VS Code + Prettier + Stylelint integration. I should probably incorporate it into the scripts though.
OK I've worked it out - sorry to waste your time. The VS code stylelint plugin had an update which seemed to fix it.
Not a waste at all! Glad you got it figured out!
Hey,
I may have my configuration wrong but updating to the latest version and latest stylelint, I'm seeing the following error:
It's easily fixed by cd'ing to /src and then running
cp index.js ../
but I'm not sure this is correct. Any ideas?I notice other libs have the
index.js
in the root: https://github.com/stylelint/stylelint-config-recommended https://github.com/hudochenkov/stylelint-order https://github.com/bjankord/stylelint-config-sass-guidelinesHere's my .stylelint config that references
stylelint-config-prettier