Skip to content

Commit

Permalink
chore: replace husky with lefthook
Browse files Browse the repository at this point in the history
  • Loading branch information
jnoortheen committed Jan 16, 2025
1 parent 9608a2e commit 0c44977
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 12 deletions.
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/commit-msg

This file was deleted.

1 change: 0 additions & 1 deletion .husky/pre-commit

This file was deleted.

Binary file modified bun.lockb
Binary file not shown.
14 changes: 14 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# EXAMPLE USAGE:
#
# Refer for explanation to following link:
# https://evilmartians.github.io/lefthook/configuration/

pre-commit:
parallel: true
jobs:
- run: bun run lint
glob: "*.{js,ts,jsx,tsx}"

commit-msg:
jobs:
- run: bun run commitlint --edit
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,21 @@
"@types/command-exists": "^1.2.3",
"@types/node": "^22.10.3",
"@types/vscode": "^1.96.0",
"@vscode/vsce": "^3.2.1",
"esbuild": "^0.24.2",
"globals": "^15.14.0",
"husky": "^9.1.7",
"js-yaml": "^4.1.0",
"lefthook": "^1.10.7",
"ovsx": "^0.10.1",
"standard-version": "^9.5.0",
"typescript": "^5.7.2",
"@vscode/vsce": "^3.2.1"
"typescript": "^5.7.2"
},
"scripts": {
"prebuild": "js-yaml syntaxes/nix.YAML-tmLanguage > syntaxes/nix.tmLanguage.json && js-yaml syntaxes/injection.yml > syntaxes/injection.json",
"build-base": "esbuild ./src/extension.ts --bundle --outfile=dist/extension.js --external:vscode --format=cjs --platform=node",
"build": "bun run build-base --sourcemap --minify",
"watch": "bun run build-base --sourcemap --watch",
"postinstall": "husky",
"postinstall": "lefthook install",
"clean": "rm -rd dist",
"prerelease": "bun install && bun run lint && bun run clean && bun run build",
"release": "standard-version",
Expand All @@ -162,4 +162,4 @@
"vscode-variables": "^1.0.1"
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
}
2 changes: 1 addition & 1 deletion src/formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ type FormattingProviders = DocumentFormattingEditProvider &
DocumentRangeFormattingEditProvider;

/**
* Formatting providers for fish documents.
* Formatting providers
*/
export const formattingProviders: FormattingProviders = {
provideDocumentFormattingEdits: (document, _, token) =>
Expand Down

0 comments on commit 0c44977

Please sign in to comment.