diff --git a/.gitignore b/.gitignore index 1c28550..bb62959 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ dist .DS_Store .eslintcache .idea +.husky diff --git a/package.json b/package.json index 7017040..eb27354 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,8 @@ "lint": "node src lint", "format": "node src format", "validate": "node src validate", - "precommit": "node src precommit" + "precommit": "node src precommit", + "prepare": "husky install" }, "files": [ "dist", diff --git a/src/config/lintstagedrc.js b/src/config/lintstagedrc.js index 9a724b2..621d8f8 100644 --- a/src/config/lintstagedrc.js +++ b/src/config/lintstagedrc.js @@ -7,7 +7,7 @@ module.exports = { '**/*.+(js|jsx|json|less|css|ts|tsx)': [ `${kcdScripts} format`, `${kcdScripts} lint`, - `${kcdScripts} test --findRelatedTests`, + `${kcdScripts} test --findRelatedTests --passWithNoTests`, ], 'README.md': doctoc ? [`${doctoc} --maxlevel 2 --notitle`] : [], };