Skip to content

Commit 1aa3d4b

Browse files
committed
fix: improve lint-staged configuration so it wont check all files in root, but only staged
1 parent 17ea96d commit 1aa3d4b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lint-staged.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
/* eslint-disable unicorn/filename-case */
22
/* eslint-disable @typescript-eslint/naming-convention */
33
module.exports = {
4-
"**/*.{js,jsx,ts,tsx}": () => ["npm run check-types", "npm run fix-eslint:staged", "npm run check-format:staged"],
4+
"**/*.{js,jsx,ts,tsx}": (filenames) => [
5+
"npm run check-types",
6+
`npm run lint -- ${filenames.join(" ")}`,
7+
`prettier --check ${filenames.join(" ")}`,
8+
],
59
};

0 commit comments

Comments
 (0)