-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
11 changed files
with
945 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env sh | ||
# shellcheck source=/dev/null | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const eslintCmd = 'eslint --fix'; | ||
const prettierCmd = 'prettier --ignore-unknown --write'; | ||
|
||
// FIXME: tsc for specific files. | ||
// TODO: Run tsc in the entire project (-p tsconfig.x.json) instead of per-file | ||
// https://github.com/lint-staged/lint-staged?tab=readme-ov-file#example-wrap-filenames-in-single-quotes-and-run-once-per-file | ||
// const tscCmd = 'tsc --noEmit'; | ||
|
||
export default { | ||
// Javascript sources | ||
'*.{js,cjs,mjs}': [eslintCmd, prettierCmd], | ||
|
||
// Typescript sources | ||
'*.{ts,cts,mts}': [eslintCmd, prettierCmd], | ||
|
||
// Other files | ||
'*!(.{js,cjs,mjs,ts,cts,mts})': [prettierCmd], | ||
'.prettierrc.json': () => 'npm run lint:prettier-config', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.