mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-07-02 00:17:40 +08:00
feat(formatting): add prettier-plugin-sh
This commit is contained in:
@@ -16,7 +16,7 @@ dry_run=""
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--version)
|
||||
version="${2//v}"
|
||||
version="${2//v/}"
|
||||
shift 2
|
||||
;;
|
||||
--platform)
|
||||
|
||||
@@ -19,7 +19,7 @@ while [[ $# -gt 0 ]]; do
|
||||
shift 2
|
||||
;;
|
||||
--snapshot-version)
|
||||
snapshot_version="${2//v}"
|
||||
snapshot_version="${2//v/}"
|
||||
shift 2
|
||||
;;
|
||||
--dry-run)
|
||||
|
||||
@@ -104,6 +104,5 @@ run_cmd() {
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
echo "✅ Done!"
|
||||
exit 0
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
build
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"plugins": ["prettier-plugin-gherkin"]
|
||||
"plugins": ["prettier-plugin-gherkin", "prettier-plugin-sh"]
|
||||
}
|
||||
|
||||
@@ -188,19 +188,23 @@ tests-integration: ## Run integration tests
|
||||
go test -tags=integration -v github.com/gotenberg/gotenberg/v8/test/integration
|
||||
|
||||
.PHONY: lint
|
||||
lint: ## Lint the code.
|
||||
lint: ## Lint codebase.
|
||||
#golangci-lint run
|
||||
npx prettier --check .
|
||||
|
||||
# go install mvdan.cc/gofumpt@latest
|
||||
# go install github.com/daixiang0/gci@latest
|
||||
.PHONY: fmt
|
||||
fmt: ## Format the code and "optimize" the dependencies
|
||||
fmt: ## Format codebase and "optimize" the dependencies
|
||||
gofumpt -l -w .
|
||||
gci write -s standard -s default -s "prefix(github.com/gotenberg/gotenberg/v8)" --skip-generated --skip-vendor --custom-order .
|
||||
npx prettier --write .
|
||||
go mod tidy
|
||||
|
||||
.PHONY: todo
|
||||
todo: ## Find TODOs in codebase.
|
||||
golangci-lint run --no-config --disable-all --enable godox
|
||||
|
||||
# go install golang.org/x/tools/cmd/godoc@latest
|
||||
.PHONY: godoc
|
||||
godoc: ## Run a webserver with Gotenberg godoc
|
||||
|
||||
Generated
+52
-1
@@ -6,7 +6,8 @@
|
||||
"": {
|
||||
"devDependencies": {
|
||||
"prettier": "3.5.2",
|
||||
"prettier-plugin-gherkin": "^3.1.1"
|
||||
"prettier-plugin-gherkin": "^3.1.1",
|
||||
"prettier-plugin-sh": "^0.15.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@cucumber/gherkin": {
|
||||
@@ -76,6 +77,13 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/mvdan-sh": {
|
||||
"version": "0.10.1",
|
||||
"resolved": "https://registry.npmjs.org/mvdan-sh/-/mvdan-sh-0.10.1.tgz",
|
||||
"integrity": "sha512-kMbrH0EObaKmK3nVRKUIIya1dpASHIEusM13S4V1ViHFuxuNxCo+arxoa6j/dbV22YBGjl7UKJm9QQKJ2Crzhg==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause"
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "3.5.2",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.2.tgz",
|
||||
@@ -104,6 +112,26 @@
|
||||
"prettier": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/prettier-plugin-sh": {
|
||||
"version": "0.15.0",
|
||||
"resolved": "https://registry.npmjs.org/prettier-plugin-sh/-/prettier-plugin-sh-0.15.0.tgz",
|
||||
"integrity": "sha512-U0PikJr/yr2bzzARl43qI0mApBj0C1xdAfA04AZa6LnvIKawXHhuy2fFo6LNA7weRzGlAiNbaEFfKMFo0nZr/A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mvdan-sh": "^0.10.1",
|
||||
"sh-syntax": "^0.4.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/unts"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"prettier": "^3.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/reflect-metadata": {
|
||||
"version": "0.1.13",
|
||||
"resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz",
|
||||
@@ -111,6 +139,29 @@
|
||||
"dev": true,
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/sh-syntax": {
|
||||
"version": "0.4.2",
|
||||
"resolved": "https://registry.npmjs.org/sh-syntax/-/sh-syntax-0.4.2.tgz",
|
||||
"integrity": "sha512-/l2UZ5fhGZLVZa16XQM9/Vq/hezGGbdHeVEA01uWjOL1+7Ek/gt6FquW0iKKws4a9AYPYvlz6RyVvjh3JxOteg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"tslib": "^2.6.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/unts"
|
||||
}
|
||||
},
|
||||
"node_modules/tslib": {
|
||||
"version": "2.8.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
||||
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
|
||||
"dev": true,
|
||||
"license": "0BSD"
|
||||
},
|
||||
"node_modules/uuid": {
|
||||
"version": "9.0.1",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"prettier": "3.5.2",
|
||||
"prettier-plugin-gherkin": "^3.1.1"
|
||||
"prettier-plugin-gherkin": "^3.1.1",
|
||||
"prettier-plugin-sh": "^0.15.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user