From 869a2425a238226d682bb0c26d5edb3f7f8ebd22 Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Sun, 11 Jul 2021 21:16:01 +0800 Subject: [PATCH] chore: update commit hooks --- packages/core/.eslintignore | 1 + packages/core/.gitignore | 1 + packages/core/lint-staged.config.js | 2 +- packages/core/package.json | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 packages/core/.eslintignore diff --git a/packages/core/.eslintignore b/packages/core/.eslintignore new file mode 100644 index 000000000..0726c3c5b --- /dev/null +++ b/packages/core/.eslintignore @@ -0,0 +1 @@ +*.config.js diff --git a/packages/core/.gitignore b/packages/core/.gitignore index 292d40c00..09a0bee2b 100644 --- a/packages/core/.gitignore +++ b/packages/core/.gitignore @@ -21,5 +21,6 @@ yarn-error.log* # misc cache +.*cache .DS_Store *.env diff --git a/packages/core/lint-staged.config.js b/packages/core/lint-staged.config.js index 1edaadb4e..a0fee416f 100644 --- a/packages/core/lint-staged.config.js +++ b/packages/core/lint-staged.config.js @@ -1,3 +1,3 @@ module.exports = { - '*.ts?(x)': ['yarn lint --fix', () => 'tsc -p tsconfig.json --noEmit'], + '*.ts?(x)': ['eslint --format pretty --cache --fix', () => 'tsc -p tsconfig.json --noEmit'], }; diff --git a/packages/core/package.json b/packages/core/package.json index 75db423ca..4b83b99a2 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -8,7 +8,7 @@ "private": true, "scripts": { "build": "tsc", - "lint": "eslint --format pretty \"src/**\"", + "lint": "eslint --format pretty --ext .ts src", "dev": "tsc-watch --onSuccess \"node ./build/index.js\"", "prepare": "husky install" },