mirror of
https://github.com/tale/headplane.git
synced 2026-08-27 07:27:41 +00:00
style: format go code on precommit
This commit is contained in:
+9
-1
@@ -6,12 +6,20 @@
|
|||||||
},
|
},
|
||||||
"code_actions_on_format": {
|
"code_actions_on_format": {
|
||||||
"source.fixAll.biome": true,
|
"source.fixAll.biome": true,
|
||||||
"source.organizeImports.biome": true
|
"source.organizeImports.biome": true,
|
||||||
|
"source.organizeImports": true
|
||||||
},
|
},
|
||||||
"languages": {
|
"languages": {
|
||||||
"YAML": {
|
"YAML": {
|
||||||
"tab_size": 2,
|
"tab_size": 2,
|
||||||
"hard_tabs": false
|
"hard_tabs": false
|
||||||
|
},
|
||||||
|
"Go": {
|
||||||
|
"formatter": {
|
||||||
|
"language_server": {
|
||||||
|
"name": "gopls"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,3 +4,7 @@ pre-commit:
|
|||||||
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
|
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
|
||||||
run: pnpm biome check --write --no-errors-on-unmatched --files-ignore-unknown=true --colors=off {staged_files}
|
run: pnpm biome check --write --no-errors-on-unmatched --files-ignore-unknown=true --colors=off {staged_files}
|
||||||
stage_fixed: true
|
stage_fixed: true
|
||||||
|
check_go:
|
||||||
|
glob: "*.go"
|
||||||
|
run: gofmt -w {staged_files}
|
||||||
|
stage_fixed: true
|
||||||
|
|||||||
Reference in New Issue
Block a user