Skip to content

Commit

Permalink
run prettier via dev container
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremywmoore committed Sep 23, 2024
1 parent 9783657 commit 57b0ffd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 7 additions & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
libffi-dev \
libpq-dev
libpq-dev \
npm

RUN pip install poetry

WORKDIR /app

COPY package.json package-lock.json .

RUN npm install

ENV PYTHONPATH=/app

COPY pyproject.toml poetry.lock .
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ lint: ## Lint the code
poetry run ruff format --check && \
poetry run ruff check && \
poetry run mypy .
docker run --rm -v $(shell pwd):/work tmknom/prettier:3.2.5 --check ./*.md ./docs ./.github/workflows/* ./hushline
docker compose run --rm -v $(shell pwd):/work app npx prettier --check ./*.md ./docs ./.github/workflows/* ./hushline

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

.PHONY: revision
revision: migrate-prod ## Create a new migration
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 57b0ffd

Please sign in to comment.