From bbdde8b68e26a68c3a4151e54ed11e905aafb598 Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Sun, 25 Jul 2021 22:39:45 +0800 Subject: [PATCH] chore(ui): add tsc in lint-staged script --- packages/ui/lint-staged.config.js | 4 ++++ packages/ui/package.json | 6 +----- 2 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 packages/ui/lint-staged.config.js diff --git a/packages/ui/lint-staged.config.js b/packages/ui/lint-staged.config.js new file mode 100644 index 000000000..7974f05d9 --- /dev/null +++ b/packages/ui/lint-staged.config.js @@ -0,0 +1,4 @@ +module.exports = { + '*.ts?(x)': ['eslint --format pretty --cache --fix', () => 'tsc -p tsconfig.json --noEmit'], + "*.scss": "stylelint --fix" +}; diff --git a/packages/ui/package.json b/packages/ui/package.json index 553a8a242..968df8092 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -58,9 +58,5 @@ "stylelint": { "extends": "@logto/eslint-config-react/.stylelintrc" }, - "prettier": "@logto/eslint-config/.prettierrc", - "lint-staged": { - "*.{ts,tsx}": "eslint --format pretty --cache --fix", - "*.scss": "stylelint --fix" - } + "prettier": "@logto/eslint-config/.prettierrc" }