Suggest stylelint --fix in CI and add to bw-dev

This commit is contained in:
Mouse Reeve 2022-02-12 08:50:13 -08:00
parent 542957364c
commit 30ad3bba0b
3 changed files with 13 additions and 1 deletions

View file

@ -1,5 +1,5 @@
# @url https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: Lint Frontend
name: Lint Frontend (run `./bw-dev stylelint` to fix css errors)
on:
push:

10
bw-dev
View file

@ -137,6 +137,14 @@ case "$CMD" in
prettier)
npx prettier --write bookwyrm/static/js/*.js
;;
stylelint)
npx stylelint bookwyrm/static/**/*.css --fix
;;
formatters)
makeitblack
npx prettier --write bookwyrm/static/js/*.js
npx stylelint bookwyrm/static/**/*.css --fix
;;
update)
git pull
docker-compose build
@ -212,6 +220,8 @@ case "$CMD" in
echo " clean"
echo " black"
echo " prettier"
echo " stylelint"
echo " formatters"
echo " populate_streams [--stream=<stream name>]"
echo " populate_suggestions"
echo " generate_thumbnails"

View file

@ -21,6 +21,8 @@ build
clean
black
prettier
stylelint
formatters
populate_streams
populate_lists_streams
populate_suggestions