From 7209994c5e9521aae0aca37a202a895d2faf4b3d Mon Sep 17 00:00:00 2001 From: sasaplus1 Date: Sat, 6 Mar 2021 19:13:57 +0900 Subject: [PATCH] improve lint-staged configs --- .lintstagedrc.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.lintstagedrc.js b/.lintstagedrc.js index 3981e2a7..8896e674 100644 --- a/.lintstagedrc.js +++ b/.lintstagedrc.js @@ -1,13 +1,9 @@ module.exports = { - '*.+(js|ts)': 'npx eslint --cache --ext .js,.ts', - '*.yml': [ - 'npx prettier --parser yaml --write', - 'git diff --exit-code --quiet' - ], + '*.+(js|ts)': ['eslint --cache --ext .js,.ts', 'prettier --check'], + '*.yml': 'prettier --check', 'package.json': [ - 'npx fixpack', - 'npx prettier --parser json-stringify --write', - 'git diff --exit-code --quiet' + 'npx fixpack --dryRun', + 'prettier --check --parser json-stringify' ], 'package-lock.json': 'node -e "process.exitCode = 1;"' };