bookwyrm
bookwyrm copied to clipboard
fix for npm dev commands (stylelint and prettier)
Fixing a number of overlapping issues that prevented stylelint from working on a fresh install (at least for me). I was getting a "permission denied" error. I believe if your install has node_modules and/or package.json outside the container, you may be able to run the commands ok. But maybe try with a fresh install dir--I believe it's reproducible.
The dev-tools image was being created okay, but then when the /app
directory was mapped, the npm files/folders were being overlaid and discarded. With my change, npm now installs to the dev-tools/
directory, and that folder is mapped to the container's directory.
I then altered the commands in ./bw-dev
to run with a prefix of dev-tools/
.
Then I modified the stylelint config as it had a number of issues:
- Use scss config to mute the warning.
- Lint all files, but exclude fonts.
- Then discovered a linter error due to the import at the bottom of the themes -- I believe it makes sense to exclude it?
And finally, cleaned up the existing linting issues.
Looks like the workflows may need to be changed for this to work, though.
Thank you for updating the dev-tools image, I'll try and take a look next week. Getting these checks working right is such a hassle 😵
I'd already merged in main and re-ran the stylelint, so I opened a PR in @viviicat's repo to save y'all the trouble: https://github.com/viviicat/bookwyrm/pull/1 - I think if @viviicat merges that PR, it should just show up as updated here.
(@mouse-reeve if you're familiar with adding origins and such locally, you can pull and merge that way too, maybe? I'm not really sure how the "maintainer pushing to someone else's PR" permissions work)
Is there something I can do to get this PR ready? I feel bad for neglecting it for so long but i'm not sure what needs to happen at this point 😅
Hmm, not sure either! I'll have to take a look at this. Probably tonight.
Any progress on this or workaround until this PR is merged? stylelint
unfortunately does not work for me without changing the docker files
Is there any chance we could revisit this one and bring it to an end?