Skip to content

Commit

Permalink
chore: Tooling (#286)
Browse files Browse the repository at this point in the history
* husky + lint-staged

* prettier all
  • Loading branch information
abernier committed Aug 18, 2024
1 parent df00722 commit 87647a5
Show file tree
Hide file tree
Showing 27 changed files with 842 additions and 113 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
echo "🪝 .husky/pre-commit hook is running"

npx tsc --noEmit
npx lint-staged
6 changes: 6 additions & 0 deletions .lintstagedrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** @type {import("lint-staged").Config} */
const config = {
'*': ['prettier --ignore-path .gitignore --ignore-unknown --write'],
}

export default config
5 changes: 0 additions & 5 deletions .prettierrc

This file was deleted.

11 changes: 11 additions & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/** @type {import("prettier").Config} */
const config = {
semi: false,
singleQuote: true,
printWidth: 100,
plugins: [
'prettier-plugin-tailwindcss', // MUST come last
],
}

export default config
2 changes: 1 addition & 1 deletion bin/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ cmd.on('exit', async (code) => {
console.log('Build completed successfully.')

await exec(
`mkdir -p ${outHostDirAbsolute}; cp -rf ${outLocalDirAbsolute}/* ${outHostDirAbsolute}`
`mkdir -p ${outHostDirAbsolute}; cp -rf ${outLocalDirAbsolute}/* ${outHostDirAbsolute}`,
)
console.log(`Preview: \`npx -y serve ${outHostDirAbsolute}\``)
})
10 changes: 5 additions & 5 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
Loading

0 comments on commit 87647a5

Please sign in to comment.