Skip to content

Commit 87647a5

Browse files
authored
chore: Tooling (#286)
* husky + lint-staged * prettier all
1 parent df00722 commit 87647a5

27 files changed

+842
-113
lines changed

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
echo "🪝 .husky/pre-commit hook is running"
2+
3+
npx tsc --noEmit
4+
npx lint-staged

.lintstagedrc.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/** @type {import("lint-staged").Config} */
2+
const config = {
3+
'*': ['prettier --ignore-path .gitignore --ignore-unknown --write'],
4+
}
5+
6+
export default config

.prettierrc

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

.prettierrc.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/** @type {import("prettier").Config} */
2+
const config = {
3+
semi: false,
4+
singleQuote: true,
5+
printWidth: 100,
6+
plugins: [
7+
'prettier-plugin-tailwindcss', // MUST come last
8+
],
9+
}
10+
11+
export default config

bin/build.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ cmd.on('exit', async (code) => {
8585
console.log('Build completed successfully.')
8686

8787
await exec(
88-
`mkdir -p ${outHostDirAbsolute}; cp -rf ${outLocalDirAbsolute}/* ${outHostDirAbsolute}`
88+
`mkdir -p ${outHostDirAbsolute}; cp -rf ${outLocalDirAbsolute}/* ${outHostDirAbsolute}`,
8989
)
9090
console.log(`Preview: \`npx -y serve ${outHostDirAbsolute}\``)
9191
})

next-env.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/// <reference types="next" />
2-
/// <reference types="next/image-types/global" />
3-
4-
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/basic-features/typescript for more information.
1+
/// <reference types="next" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/basic-features/typescript for more information.

0 commit comments

Comments
 (0)