From 7780c487ebeaa73dbfb00a633abd46087112566d Mon Sep 17 00:00:00 2001 From: Jason Gill <103820+gilluminate@users.noreply.github.com> Date: Wed, 25 Mar 2026 11:27:25 -0600 Subject: [PATCH 1/5] Add check/check:ci scripts and standardize lint naming in clients Combine lint, format, and typecheck into a single `check` (fix) and `check:ci` (check-only) script across all client workspaces. Rename lint scripts to match format convention: `lint` = fix, `lint:ci` = check-only. Simplify admin-ui and privacy-center lint commands by removing redundant next lint + separate cypress eslint calls. Update CI workflow and pre-commit hook to use the new combined scripts. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/frontend_checks.yml | 10 ++-------- .pre-commit-config-with-static-check.yml | 15 ++++----------- clients/admin-ui/package.json | 6 ++++-- clients/fides-js/package.json | 6 ++++-- clients/fidesui/package.json | 6 ++++-- clients/package.json | 4 +++- clients/privacy-center/package.json | 6 ++++-- clients/turbo.json | 14 +++++++++++--- 8 files changed, 36 insertions(+), 31 deletions(-) diff --git a/.github/workflows/frontend_checks.yml b/.github/workflows/frontend_checks.yml index ea50803c546..6e07a40580f 100644 --- a/.github/workflows/frontend_checks.yml +++ b/.github/workflows/frontend_checks.yml @@ -73,14 +73,8 @@ jobs: exit 1 fi - - name: Typecheck - run: npm run typecheck - - - name: Lint - run: npm run lint - - - name: Format - run: npm run format:ci + - name: Check (lint, format, typecheck) + run: npm run check:ci - name: Unit tests run: npm run test diff --git a/.pre-commit-config-with-static-check.yml b/.pre-commit-config-with-static-check.yml index a9f5d1f78a2..aff0ab5bcef 100644 --- a/.pre-commit-config-with-static-check.yml +++ b/.pre-commit-config-with-static-check.yml @@ -50,16 +50,9 @@ repos: language: system types: [python] - - id: npm-run-format - name: npm-run-format - description: Check for frontend linting errors - entry: sh -c 'cd clients; npm run format' - language: system - types: [javascript, jsx, ts, tsx] - - - id: npm-run-lint - name: npm-run-lint - description: Check for frontend linting errors - entry: sh -c 'cd clients; npm run lint:fix' + - id: npm-run-check + name: npm-run-check + description: Run lint, format, and typecheck for frontend + entry: sh -c 'cd clients; npm run check' language: system types: [javascript, jsx, ts, tsx] diff --git a/clients/admin-ui/package.json b/clients/admin-ui/package.json index 79679c86ccc..6026dbf67a9 100644 --- a/clients/admin-ui/package.json +++ b/clients/admin-ui/package.json @@ -21,8 +21,10 @@ "prod-export": "npm run export && npm run copy-export", "format": "prettier --write .", "format:ci": "prettier --check .", - "lint": "next lint && eslint ./cypress/e2e/**/*.ts ./cypress/support/**/*.ts", - "lint:fix": "eslint --fix . && eslint --fix ./cypress/e2e/**/*.ts ./cypress/support/**/*.ts", + "check": "npm run lint && npm run format && npm run typecheck", + "check:ci": "npm run lint:ci && npm run format:ci && npm run typecheck", + "lint": "eslint --fix .", + "lint:ci": "eslint .", "lint-staged:fix": "lint-staged --diff=main", "openapi:generate": "openapi --input http://localhost:8080/openapi.json --output ./src/types/api --exportCore false --exportServices false --indent 2 && prettier --write .", "openapi:generate-dictionary": "openapi --input http://localhost:8081/openapi.json --output ./src/types/dictionary-api --exportCore false --exportServices false --indent 2", diff --git a/clients/fides-js/package.json b/clients/fides-js/package.json index 4559fa3589f..8d7b3bda3af 100644 --- a/clients/fides-js/package.json +++ b/clients/fides-js/package.json @@ -39,8 +39,10 @@ "docs:generate": "typedoc --tsconfig ./tsconfig.json --out docs src/docs/ ", "format": "prettier --write .", "format:ci": "prettier --check .", - "lint": "eslint .", - "lint:fix": "eslint --fix .", + "check": "npm run lint && npm run format && npm run typecheck", + "check:ci": "npm run lint:ci && npm run format:ci && npm run typecheck", + "lint": "eslint --fix .", + "lint:ci": "eslint .", "test": "jest", "test:watch": "jest --watchAll", "typecheck": "tsc --noEmit" diff --git a/clients/fidesui/package.json b/clients/fidesui/package.json index 31a47b7b005..4e77c7c8822 100644 --- a/clients/fidesui/package.json +++ b/clients/fidesui/package.json @@ -5,8 +5,10 @@ "types": "src/index.ts", "type": "module", "scripts": { - "lint": "eslint .", - "lint:fix": "eslint --fix .", + "check": "npm run lint && npm run format && npm run typecheck", + "check:ci": "npm run lint:ci && npm run format:ci && npm run typecheck", + "lint": "eslint --fix .", + "lint:ci": "eslint .", "format": "prettier --write .", "format:ci": "prettier --check .", "typecheck": "tsc --noEmit", diff --git a/clients/package.json b/clients/package.json index 81a07c556e2..38ab3cc249f 100644 --- a/clients/package.json +++ b/clients/package.json @@ -16,8 +16,10 @@ "dev-admin-ui": "turbo run dev --filter=admin-ui", "dev-pc": "turbo run dev --filter=privacy-center", "start": "turbo run start", + "check": "turbo run check", + "check:ci": "turbo run check:ci", "lint": "turbo run lint --force", - "lint:fix": "turbo run lint:fix --force", + "lint:ci": "turbo run lint:ci --force", "format": "turbo run format", "format:ci": "turbo run format:ci", "test": "turbo run test", diff --git a/clients/privacy-center/package.json b/clients/privacy-center/package.json index 78a544d469f..6a95b02ad0a 100644 --- a/clients/privacy-center/package.json +++ b/clients/privacy-center/package.json @@ -9,8 +9,10 @@ "build:test": "NODE_ENV=test FIDES_PRIVACY_CENTER__IS_OVERLAY_ENABLED=true next build", "start": "next start", "start:test": "FIDES_PRIVACY_CENTER__ENABLE_EXTERNAL_TASK_PORTAL=true next start -p 3001", - "lint": "next lint && eslint ./cypress/**/*.ts", - "lint:fix": "eslint --fix . && eslint --fix ./cypress/**/*.ts", + "check": "npm run lint && npm run format && npm run typecheck", + "check:ci": "npm run lint:ci && npm run format:ci && npm run typecheck", + "lint": "eslint --fix .", + "lint:ci": "eslint .", "lint-staged:fix": "lint-staged --diff=main", "format": "prettier --write .", "format:ci": "prettier --check .", diff --git a/clients/turbo.json b/clients/turbo.json index cb1cbd44690..586a57dcaaa 100644 --- a/clients/turbo.json +++ b/clients/turbo.json @@ -29,16 +29,24 @@ "dependsOn": ["build"], "outputs": [".next/*", "!.next/cache/*"] }, - "lint": { + "check": { + "dependsOn": [], + "cache": false + }, + "check:ci": { "dependsOn": [] }, - "lint:fix": { + "lint": { "dependsOn": [], "cache": false }, - "format": { + "lint:ci": { "dependsOn": [] }, + "format": { + "dependsOn": [], + "cache": false + }, "format:ci": { "dependsOn": [] }, From c44e1433a1dffa93152d07acafe0ea9956e3b3ef Mon Sep 17 00:00:00 2001 From: Jason Gill <103820+gilluminate@users.noreply.github.com> Date: Wed, 25 Mar 2026 11:27:49 -0600 Subject: [PATCH 2/5] Add changelog entry for #7755 Co-Authored-By: Claude Opus 4.6 --- changelog/7755-add-check-scripts.yaml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 changelog/7755-add-check-scripts.yaml diff --git a/changelog/7755-add-check-scripts.yaml b/changelog/7755-add-check-scripts.yaml new file mode 100644 index 00000000000..4a7b7e28c7f --- /dev/null +++ b/changelog/7755-add-check-scripts.yaml @@ -0,0 +1,4 @@ +type: Developer Experience +description: Add combined `check`/`check:ci` scripts and standardize lint naming convention in client workspaces +pr: 7755 +labels: [] From 17cb337934970d061e46e04dd889612cd14ed498 Mon Sep 17 00:00:00 2001 From: Jason Gill <103820+gilluminate@users.noreply.github.com> Date: Wed, 25 Mar 2026 11:37:06 -0600 Subject: [PATCH 3/5] Fix check/check:ci to depend on ^build for typecheck The check scripts call typecheck internally via npm run, so turbo doesn't resolve the ^build dependency that typecheck normally has. Add ^build to check and check:ci so fides-js is built before privacy-center typechecks against it. Co-Authored-By: Claude Opus 4.6 --- clients/turbo.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/turbo.json b/clients/turbo.json index 586a57dcaaa..8fce9e5c382 100644 --- a/clients/turbo.json +++ b/clients/turbo.json @@ -30,11 +30,11 @@ "outputs": [".next/*", "!.next/cache/*"] }, "check": { - "dependsOn": [], + "dependsOn": ["^build"], "cache": false }, "check:ci": { - "dependsOn": [] + "dependsOn": ["^build"] }, "lint": { "dependsOn": [], From c4b5f227568c4e9e9a60256dcf8957d6efe81322 Mon Sep 17 00:00:00 2001 From: Jason Gill <103820+gilluminate@users.noreply.github.com> Date: Wed, 25 Mar 2026 12:47:42 -0600 Subject: [PATCH 4/5] Add changelog for PR #7755 Co-Authored-By: Claude Opus 4.6 --- changelog/7755-add-check-scripts.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog/7755-add-check-scripts.yaml b/changelog/7755-add-check-scripts.yaml index 4a7b7e28c7f..9f1c71f6e56 100644 --- a/changelog/7755-add-check-scripts.yaml +++ b/changelog/7755-add-check-scripts.yaml @@ -1,4 +1,4 @@ type: Developer Experience -description: Add combined `check`/`check:ci` scripts and standardize lint naming convention in client workspaces +description: Added combined check and check:ci scripts for lint, format, and typecheck pr: 7755 labels: [] From cb83fb4323e525dabb1ed34ac00f3750431ddcda Mon Sep 17 00:00:00 2001 From: Jason Gill <103820+gilluminate@users.noreply.github.com> Date: Wed, 25 Mar 2026 12:59:39 -0600 Subject: [PATCH 5/5] Revert pre-commit hook to run format + lint separately Keep typecheck out of the pre-commit hook to avoid 30-90s slowdown on every commit. CI handles typecheck via check:ci. Co-Authored-By: Claude Opus 4.6 --- .pre-commit-config-with-static-check.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config-with-static-check.yml b/.pre-commit-config-with-static-check.yml index aff0ab5bcef..6f8dbb97a5c 100644 --- a/.pre-commit-config-with-static-check.yml +++ b/.pre-commit-config-with-static-check.yml @@ -50,9 +50,16 @@ repos: language: system types: [python] - - id: npm-run-check - name: npm-run-check - description: Run lint, format, and typecheck for frontend - entry: sh -c 'cd clients; npm run check' + - id: npm-run-format + name: npm-run-format + description: Format frontend code + entry: sh -c 'cd clients; npm run format' + language: system + types: [javascript, jsx, ts, tsx] + + - id: npm-run-lint + name: npm-run-lint + description: Lint and fix frontend code + entry: sh -c 'cd clients; npm run lint' language: system types: [javascript, jsx, ts, tsx]