Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ coverage/
.tmp*
.vscode
dist/
.yarn*
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
#!/bin/sh

Copy link
Member

@uiolee uiolee Feb 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but got error on my windows, see the screenshoot

Copy link
Contributor Author

@dimaslanjaka dimaslanjaka Feb 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git scm windows version still need shebang. and shebang still allowed by husky. here the doc, Note section

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could see your screenshot of error. However, I could not reproduce on my window.

npx lint-staged
2 changes: 1 addition & 1 deletion lib/plugins/console/clean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Promise from 'bluebird';
import { exists, unlink, rmdir } from 'hexo-fs';
import type Hexo from '../../hexo';

function cleanConsole(this: Hexo): Promise<[void, void, any]> {
function cleanConsole(this: Hexo, _args?: any) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

截屏2025-07-25 下午12 00 04 Seems no eslint error here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for new husky v9 this no error for git scm windows. what the solution now ?
update husky ?

return Promise.all([
deleteDatabase(this),
deletePublicDir(this),
Expand Down
Loading