From 30ad3bba0bb85d7d3c8ad4f7907e9223abb9a053 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sat, 12 Feb 2022 08:50:13 -0800 Subject: [PATCH] Suggest stylelint --fix in CI and add to bw-dev --- .github/workflows/lint-frontend.yaml | 2 +- bw-dev | 10 ++++++++++ complete_bwdev.sh | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint-frontend.yaml b/.github/workflows/lint-frontend.yaml index 54cac04d0..041afa132 100644 --- a/.github/workflows/lint-frontend.yaml +++ b/.github/workflows/lint-frontend.yaml @@ -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: diff --git a/bw-dev b/bw-dev index ded796b84..cec425393 100755 --- a/bw-dev +++ b/bw-dev @@ -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=]" echo " populate_suggestions" echo " generate_thumbnails" diff --git a/complete_bwdev.sh b/complete_bwdev.sh index 85115fba0..6dd574541 100644 --- a/complete_bwdev.sh +++ b/complete_bwdev.sh @@ -21,6 +21,8 @@ build clean black prettier +stylelint +formatters populate_streams populate_lists_streams populate_suggestions