Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions .github/workflows/frontend_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config-with-static-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ repos:

- id: npm-run-format
name: npm-run-format
description: Check for frontend linting errors
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: Check for frontend linting errors
entry: sh -c 'cd clients; npm run lint:fix'
description: Lint and fix frontend code
entry: sh -c 'cd clients; npm run lint'
language: system
types: [javascript, jsx, ts, tsx]
4 changes: 4 additions & 0 deletions changelog/7755-add-check-scripts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type: Developer Experience
description: Added combined check and check:ci scripts for lint, format, and typecheck
pr: 7755
labels: []
6 changes: 4 additions & 2 deletions clients/admin-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 4 additions & 2 deletions clients/fides-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 4 additions & 2 deletions clients/fidesui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 3 additions & 1 deletion clients/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 4 additions & 2 deletions clients/privacy-center/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 .",
Expand Down
16 changes: 12 additions & 4 deletions clients/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,24 @@
"dependsOn": ["build"],
"outputs": [".next/*", "!.next/cache/*"]
},
"lint": {
"dependsOn": []
"check": {
"dependsOn": ["^build"],
"cache": false
},
"check:ci": {
"dependsOn": ["^build"]
},
"lint:fix": {
"lint": {
"dependsOn": [],
"cache": false
},
"format": {
"lint:ci": {
"dependsOn": []
},
"format": {
"dependsOn": [],
"cache": false
},
"format:ci": {
"dependsOn": []
},
Expand Down
Loading