@10stars/config 13.7.5 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.ts +7 -6
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -28,7 +28,8 @@ const getESLintCommonCmd = async () => {
|
|
|
28
28
|
.join(` `)} ${process.env.CI ? `--quiet` : ``}`
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
const typecheck = () =>
|
|
31
|
+
const typecheck = () =>
|
|
32
|
+
exec(`bun run tsc --project ./tsconfig.json --noEmit --watch`)
|
|
32
33
|
|
|
33
34
|
const actions = {
|
|
34
35
|
prepare: {
|
|
@@ -45,7 +46,7 @@ const actions = {
|
|
|
45
46
|
action: async () => {
|
|
46
47
|
const isMonorepo = await checkIsMonorepo(cwd)
|
|
47
48
|
exec(
|
|
48
|
-
`prettier -l --write './${isMonorepo ? `*/` : ``}src/**/*.{t,j}s{x,}'`,
|
|
49
|
+
`bun run prettier -l --write './${isMonorepo ? `*/` : ``}src/**/*.{t,j}s{x,}'`,
|
|
49
50
|
)
|
|
50
51
|
},
|
|
51
52
|
},
|
|
@@ -59,19 +60,19 @@ const actions = {
|
|
|
59
60
|
},
|
|
60
61
|
typecheckOnce: {
|
|
61
62
|
info: `Typecheck code (once)`,
|
|
62
|
-
action: () => exec(`tsc --project ./tsconfig.json --noEmit`),
|
|
63
|
+
action: () => exec(`bun run tsc --project ./tsconfig.json --noEmit`),
|
|
63
64
|
},
|
|
64
65
|
lint: {
|
|
65
66
|
info: `Lint code (once)`,
|
|
66
|
-
action: async () =>
|
|
67
|
+
action: async () =>
|
|
68
|
+
exec(`bun run eslint --fix ${await getESLintCommonCmd()}`),
|
|
67
69
|
},
|
|
68
70
|
precommit: {
|
|
69
71
|
info: `Run pre-commit hooks`,
|
|
70
72
|
action: () => {
|
|
71
73
|
const pathCommitlint = new URL(`../commitlint.config.js`, import.meta.url)
|
|
72
74
|
.pathname
|
|
73
|
-
|
|
74
|
-
exec(`npm exec -- commitlint --edit --config ${pathCommitlint}`)
|
|
75
|
+
exec(`bun run commitlint --edit --config ${pathCommitlint}`)
|
|
75
76
|
},
|
|
76
77
|
},
|
|
77
78
|
} satisfies Record<string, { info: string; action: () => void | Promise<void> }>
|