From 88b9444dffecac4c8bacf72915cd30b0c9e13775 Mon Sep 17 00:00:00 2001 From: koji Date: Tue, 23 Apr 2024 01:39:05 -0400 Subject: [PATCH 1/2] refactor(monorepo): update lint-js command update lint-js command to speed up the linting process close AUTH- --- .gitignore | 1 + Makefile | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e3f5d0620a8..24c7debdd80 100755 --- a/.gitignore +++ b/.gitignore @@ -160,3 +160,4 @@ opentrons-robot-app.tar.gz # asdf versions file .tool-versions mock_dir +.eslintcache diff --git a/Makefile b/Makefile index 1b2bbf42b82..0e3ca21fa7e 100755 --- a/Makefile +++ b/Makefile @@ -214,10 +214,11 @@ lint-py: $(PYTHON_LINT_TARGETS) %-py-lint: $(MAKE) -C $* lint -.PHONY: lint-js lint-js: - yarn eslint --quiet=$(quiet) ".*.@(js|ts|tsx)" "**/*.@(js|ts|tsx)" - yarn prettier --ignore-path .eslintignore --check $(FORMAT_FILE_GLOB) + @pids=""; \ + yarn eslint --quiet=$(quiet) --ignore-pattern "node_modules/" --cache ".*.@(js|ts|tsx)" "**/*.@(js|ts|tsx)" & pids="$$pids $$!"; \ + yarn prettier --ignore-path .eslintignore --check $(FORMAT_FILE_GLOB) & pids="$$pids $$!"; \ + for pid in $$pids; do wait $$pid; done .PHONY: lint-json lint-json: From e4fbb98997f5a911c5d24c8d0377949f20a1e8c3 Mon Sep 17 00:00:00 2001 From: koji Date: Thu, 25 Apr 2024 00:40:48 -0400 Subject: [PATCH 2/2] address feedback --- Makefile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 0e3ca21fa7e..c24e2751137 100755 --- a/Makefile +++ b/Makefile @@ -214,11 +214,17 @@ lint-py: $(PYTHON_LINT_TARGETS) %-py-lint: $(MAKE) -C $* lint -lint-js: - @pids=""; \ - yarn eslint --quiet=$(quiet) --ignore-pattern "node_modules/" --cache ".*.@(js|ts|tsx)" "**/*.@(js|ts|tsx)" & pids="$$pids $$!"; \ - yarn prettier --ignore-path .eslintignore --check $(FORMAT_FILE_GLOB) & pids="$$pids $$!"; \ - for pid in $$pids; do wait $$pid; done +.PHONY: lint-js +lint-js: lint-js-eslint lint-js-prettier + +.PHONY: lint-js-eslint +lint-js-eslint: + yarn eslint --quiet=$(quiet) --ignore-pattern "node_modules/" --cache ".*.@(js|ts|tsx)" "**/*.@(js|ts|tsx)" + +.PHONY: lint-js-prettier +lint-js-prettier: + yarn prettier --ignore-path .eslintignore --check $(FORMAT_FILE_GLOB) + .PHONY: lint-json lint-json: