Skip to content
This repository was archived by the owner on Jun 28, 2025. It is now read-only.

Commit ff1f463

Browse files
committed
feat(makefile): add lint and prettier script
1 parent 515dec0 commit ff1f463

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

makefile

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ help:
3434
@echo " check-env: compare keys in .env files with .env.example files"
3535
@echo " logs: show logs for all containers"
3636
@echo " clean: clean up workspace"
37+
@echo " pretty: run prettier write for all services"
38+
@echo " lint: run eslint for all services"
3739
@echo
3840
@echo " stop: stop all containers"
3941
@echo " stop-web: stop only web"
@@ -64,14 +66,6 @@ check-env:
6466
./scripts/check-env.sh .env.example web/.env
6567
./scripts/check-env.sh cms/.env.example cms/.env
6668

67-
# NOTE: Package throws an error when using the CLI to import or export config
68-
import-config:
69-
@echo "Syncing config files to the database"
70-
cd cms/ && npm run cs i
71-
export-config:
72-
@echo "Exporting config files from the database"
73-
cd cms/ && npm run cs e
74-
7569
logs:
7670
$(DC) logs -t -f web db cms
7771

@@ -116,4 +110,22 @@ build-web:
116110
$(DC) build web
117111

118112
build-cms:
119-
$(DC) build cms
113+
$(DC) build cms
114+
115+
## Tooling
116+
lint:
117+
cd web && . ${NVM_DIR}/nvm.sh && nvm use && npm run lint:fix
118+
cd cms && . ${NVM_DIR}/nvm.sh && nvm use && npm run lint:fix
119+
120+
pretty:
121+
cd web && . ${NVM_DIR}/nvm.sh && nvm use && npm run format
122+
cd cms && . ${NVM_DIR}/nvm.sh && nvm use && npm run format
123+
124+
# NOTE: Package throws an error when using the CLI to import or export config
125+
import-config:
126+
@echo "Syncing config files to the database"
127+
cd cms/ && npm run cs i
128+
129+
export-config:
130+
@echo "Exporting config files from the database"
131+
cd cms/ && npm run cs e

0 commit comments

Comments
 (0)