Skip to content

Commit

Permalink
run prettier and other linters via docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremywmoore committed Sep 23, 2024
1 parent 16c4b5d commit da7b950
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ help: ## Print the help message
.PHONY: install
install:
poetry install
npm install

.PHONY: run
run: ## Run the app
Expand All @@ -26,16 +25,18 @@ migrate-prod: ## Run prod env (alembic) migrations

.PHONY: lint
lint: ## Lint the code
docker compose run --rm app \
poetry run ruff format --check && \
poetry run ruff check && \
poetry run mypy .
npx prettier --check .
docker run --rm -v $(shell pwd):/work tmknom/prettier:3.2.5 --check ./*.md ./docs ./.github/workflows/* ./hushline

.PHONY: fix
fix: ## Format the code
docker compose run --rm app \
poetry run ruff format && \
poetry run ruff check --fix
npx prettier --write .
docker run --rm -v $(shell pwd):/work tmknom/prettier:3.2.5 --write ./*.md ./docs ./.github/workflows/* ./hushline

.PHONY: revision
revision: migrate-prod ## Create a new migration
Expand Down

0 comments on commit da7b950

Please sign in to comment.