Skip to content

Commit ab9eb45

Browse files
committed
chore: use config folder
1 parent 6df6e0a commit ab9eb45

File tree

12 files changed

+52
-48
lines changed

12 files changed

+52
-48
lines changed

.config/.lintstagedrc.commit.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default {
2+
"**/*.{js,ts,json}": (filenames) =>
3+
filenames.length ? [`pnpm biome --write ${filenames.join(" ")}`] : [],
4+
"!(**/*.{js,ts,json})": (filenames) =>
5+
filenames.length ? [`pnpm prettier --check ${filenames.join(" ")}`] : [],
6+
};

.config/.lintstagedrc.push.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default {
2+
"*": (filenames) => (filenames.length >= 5 ? ["pnpm build check test"] : []),
3+
};

.config/.prettierignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
**/generated**
2+
**/*.js
3+
**/*.ts
4+
**/*.json
5+
.husky/**
6+
.config/.prettierignore
7+
**/pnpm-*
8+
LICENSE

.husky/pre-commit

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#!/bin/sh
22

3-
pnpx lint-staged --config .lintstagedrc.commit.js
3+
set -ex
4+
pnpx lint-staged --config .config/.lintstagedrc.commit.js

.husky/pre-push

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
#!/bin/sh
22

3-
pnpx lint-staged --config .lintstagedrc.push.js
3+
set -ex
4+
5+
pnpx lint-staged --config .config/.lintstagedrc.push.js

.lintstagedrc.commit.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

.lintstagedrc.push.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

.pretter.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

.prettierignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@
1818
],
1919
"[shellscript]": {
2020
"editor.defaultFormatter": "foxundermoon.shell-format"
21-
}
21+
},
22+
"prettier.configPath": "./config/.prettier.json",
23+
"prettier.ignorePath": ".config/.prettierignore"
2224
}

0 commit comments

Comments
 (0)