From 204e22215d1bfd133aa3097fd871790163aa3b6d Mon Sep 17 00:00:00 2001 From: Evan Hahn Date: Thu, 11 Apr 2024 17:01:14 -0500 Subject: [PATCH] chore: lint-staged improvements (#556) This makes two improvements to `lint-staged`: - Run Prettier on all files, not just some extensions. - Only check files, not fix them. This addresses a race condition (search [lint-staged's docs][0] for "race condition"). [0]: https://www.npmjs.com/package/lint-staged --- package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b414c85e..ffaeac27 100644 --- a/package.json +++ b/package.json @@ -34,9 +34,11 @@ }, "lint-staged": { "*.js": [ - "eslint --cache --fix" + "eslint --cache" ], - "*.{js,css,md}": "prettier --write" + "*": [ + "prettier --check" + ] }, "eslintConfig": { "env": {