From 97bdb2dd64203b96c1c9e3975321821fd05ca314 Mon Sep 17 00:00:00 2001 From: Lucy C <12953208+elvece@users.noreply.github.com> Date: Wed, 20 Jul 2022 20:22:26 -0600 Subject: [PATCH] run build checks only when relevant FE changes (#1664) --- frontend/lint-staged.config.js | 8 ++++++++ frontend/package.json | 6 +----- 2 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 frontend/lint-staged.config.js diff --git a/frontend/lint-staged.config.js b/frontend/lint-staged.config.js new file mode 100644 index 000000000..4db7d0066 --- /dev/null +++ b/frontend/lint-staged.config.js @@ -0,0 +1,8 @@ +module.exports = { + '**/*.{js,ts,html,md,json}': 'prettier --write', + '*.ts': 'tslint --fix', + 'projects/ui/**/*.ts': () => 'npm run check:ui', + 'projects/shared/**/*.ts': () => 'npm run check:shared', + 'projects/diagnostic-ui/**/*.ts': () => 'npm run check:diagnostic-ui', + 'projects/setup-wizard/**/*.ts': () => 'npm run check:setup-wizard', +} diff --git a/frontend/package.json b/frontend/package.json index b8033fa25..1dfef47e0 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -84,11 +84,7 @@ }, "husky": { "hooks": { - "pre-commit": "lint-staged && npm run check" + "pre-commit": "lint-staged --concurrent false" } - }, - "lint-staged": { - "**/*.{js,ts,html,md,less,json}": "prettier --write", - "*.ts": "tslint --fix" } }