From 8fed2606d605ff5bb803a7a6de109a15a60b82a0 Mon Sep 17 00:00:00 2001 From: Quentin BEY Date: Tue, 20 May 2025 14:57:06 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB(frontend)=20a?= =?UTF-8?q?dd=20makefile=20`lint=20--fix`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a Makefile command to easily run the automatic fixup for frontend files. --- Makefile | 6 +++++- src/frontend/package.json | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1848dc5..ba1c0cd 100644 --- a/Makefile +++ b/Makefile @@ -158,10 +158,14 @@ lint-pylint: ## lint back-end python sources with pylint only on changed files f bin/pylint --diff-only=origin/main .PHONY: lint-pylint -lint-front: +lint-front: ## lint front-end sources with eslint cd $(PATH_FRONT) && yarn lint .PHONY: lint-front +lint-front-fix: ## fix front-end sources with eslint + cd $(PATH_FRONT) && yarn lint-fix +.PHONY: lint-front-fix + test: ## run project tests @$(MAKE) test-back-parallel .PHONY: test diff --git a/src/frontend/package.json b/src/frontend/package.json index 9cec6d5..c26d3af 100644 --- a/src/frontend/package.json +++ b/src/frontend/package.json @@ -19,6 +19,7 @@ "ci:build": "yarn APP_DESK run build:ci", "e2e:test": "yarn APP_E2E run test", "lint": "yarn APP_DESK run lint && yarn APP_E2E run lint && yarn workspace eslint-config-people run lint && yarn I18N run lint", + "lint-fix": "yarn APP_DESK run lint --fix && yarn APP_E2E run lint --fix && yarn workspace eslint-config-people run lint --fix && yarn I18N run lint --fix", "i18n:extract": "yarn I18N run extract-translation", "i18n:deploy": "yarn I18N run format-deploy && yarn APP_DESK prettier", "i18n:test": "yarn I18N run test"