From 494ef801a2d270d9d951644041c1d2d773ee7301 Mon Sep 17 00:00:00 2001 From: James Brunton Date: Tue, 9 Sep 2025 16:18:09 +0100 Subject: [PATCH] Improve npm scripts (#4424) # Description of Changes Change NPM scripts so they call each other (single source of truth) and add a command to run type checking, linting and tests (to give confidence CI will pass). --- frontend/package.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index d73e9ad97..0b14a8ffc 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -38,16 +38,18 @@ }, "scripts": { "predev": "npm run generate-icons", - "dev": "npx tsc --noEmit && vite", + "dev": "npm run typecheck && vite", "prebuild": "npm run generate-icons", - "lint": "npx eslint", - "build": "npx tsc --noEmit && vite build", + "lint": "eslint", + "build": "npm run typecheck && vite build", "preview": "vite preview", "typecheck": "tsc --noEmit", + "check": "npm run typecheck && npm run lint && npm run test:run", "generate-licenses": "node scripts/generate-licenses.js", "generate-icons": "node scripts/generate-icons.js", "generate-icons:verbose": "node scripts/generate-icons.js --verbose", "test": "vitest", + "test:run": "vitest run", "test:watch": "vitest --watch", "test:coverage": "vitest --coverage", "test:e2e": "playwright test",