diff --git a/shared-data/.eslintignore b/shared-data/.eslintignore deleted file mode 100644 index 45921e164ac..00000000000 --- a/shared-data/.eslintignore +++ /dev/null @@ -1,21 +0,0 @@ -**/node_modules/** -**/coverage/** -**/dist/**/* -**/lib/**/* -**/build/** -**/venv/** -.opentrons_config -**/tsconfig*.json -**/vite.config.mts -# prettier -**/package.json -**/CHANGELOG.md - -# components library -storybook-static - -# python projects and tools -**/.mypy_cache/** -**/.pytest_cache/** - -python/** diff --git a/shared-data/Makefile b/shared-data/Makefile index eaef0a370f6..94cd26ffbf3 100644 --- a/shared-data/Makefile +++ b/shared-data/Makefile @@ -9,6 +9,9 @@ tests ?= cov_opts ?= --coverage=true test_opts ?= +# warning suppression variables for tests and linting +quiet ?= false + FORMAT_FILE_GLOB = "**/*.@(ts|tsx|js|json|md|yml)" # Top level targets @@ -28,6 +31,9 @@ clean: clean-py .PHONY: format format: format-js format-py +.PHONY: lint +lint: lint-js lint-py + # JavaScript targets .PHONY: lib-js @@ -41,11 +47,19 @@ build-ts: .PHONY: format-js format-js: - yarn prettier --ignore-path .eslintignore --write $(FORMAT_FILE_GLOB) + yarn prettier --ignore-path ../.eslintignore --write $(FORMAT_FILE_GLOB) .PHONY: lint-js -lint-js: - yarn prettier --ignore-path .eslintignore --check $(FORMAT_FILE_GLOB) +lint-js: lint-js-eslint lint-js-prettier + +.PHONY: lint-js-eslint +lint-js-eslint: + yarn eslint --ignore-path ../.eslintignore --quiet=$(quiet) --ignore-pattern "node_modules/" "**/*.@(js|ts|tsx)" + +.PHONY: lint-js-prettier +lint-js-prettier: + yarn prettier --ignore-path ../.eslintignore --check $(FORMAT_FILE_GLOB) + # Python targets