Merge pull request #6120 from overleaf/jpa-same-linting-packages

[misc] move the linting setup to the root of the monorepo

GitOrigin-RevId: 1633e2a58598add0b727738cd3bfba0ab7bae781
This commit is contained in:
Jakob Ackermann
2021-12-17 09:03:06 +00:00
committed by Copybot
parent c8f61e908c
commit 4b308553be
116 changed files with 1034 additions and 48479 deletions
+12 -3
View File
@@ -26,14 +26,23 @@ clean:
-$(DOCKER_COMPOSE_TEST_UNIT) down --rmi local
-$(DOCKER_COMPOSE_TEST_ACCEPTANCE) down --rmi local
HERE=$(shell pwd)
MONOREPO=$(shell cd ../../ && pwd)
# Run the linting commands in the scope of the monorepo.
# Eslint and prettier (plus some configs) are on the root.
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:14.18.1 npm run --silent
format:
$(DOCKER_COMPOSE) run --rm test_unit npm run --silent format
$(RUN_LINTING) format
format_fix:
$(DOCKER_COMPOSE) run --rm test_unit npm run --silent format:fix
$(RUN_LINTING) format:fix
lint:
$(DOCKER_COMPOSE) run --rm test_unit npm run --silent lint
$(RUN_LINTING) lint
lint_fix:
$(RUN_LINTING) lint:fix
test: format lint test_unit test_acceptance