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" }