2022-07-26 03:18:47 +00:00
|
|
|
.PHONY: lint format
|
|
|
|
|
|
|
|
help:
|
2023-11-10 03:18:20 +00:00
|
|
|
@echo "lint - check style with black, ruff, sort python with ruff, indent html, and lint frontend css/js"
|
|
|
|
@echo "format - enforce a consistent code style across the codebase, sort python files with ruff and fix frontend css/js"
|
2022-07-26 03:18:47 +00:00
|
|
|
|
2022-07-26 05:10:01 +00:00
|
|
|
lint-server:
|
2023-11-10 03:18:20 +00:00
|
|
|
black --target-version py38 --check --diff .
|
|
|
|
ruff check .
|
2022-07-26 03:18:47 +00:00
|
|
|
curlylint --parse-only bakerydemo
|
|
|
|
git ls-files '*.html' | xargs djhtml --check
|
|
|
|
|
2022-07-26 05:10:01 +00:00
|
|
|
lint-client:
|
|
|
|
npm run lint:css --silent
|
|
|
|
npm run lint:js --silent
|
|
|
|
npm run lint:format --silent
|
|
|
|
|
|
|
|
lint: lint-server lint-client
|
|
|
|
|
|
|
|
format-server:
|
2023-11-10 03:18:20 +00:00
|
|
|
black --target-version py38 .
|
|
|
|
ruff check . --fix
|
2022-07-26 03:18:47 +00:00
|
|
|
git ls-files '*.html' | xargs djhtml -i
|
2022-07-26 05:10:01 +00:00
|
|
|
|
|
|
|
format-client:
|
|
|
|
npm run format
|
|
|
|
npm run fix:js
|
|
|
|
|
|
|
|
format: format-server format-client
|