From 0dfd27f08c10db3d069b99f0a8a2b2f6d86ee1df Mon Sep 17 00:00:00 2001 From: nickl-portainer Date: Thu, 18 Jun 2026 13:27:01 +1200 Subject: [PATCH] fix(pnpm): pnpm format command failing [R8S-1071] (#2932) --- .github/DISCUSSION_TEMPLATE/ideas.yaml | 4 ++-- .golangci-forward.yaml | 2 +- .golangci.yaml | 10 +++++----- .prettierignore | 4 +++- lint-staged.config.js | 4 ++-- package.json | 6 +++--- pkg/libstack/compose/docker-compose-test.yml | 4 ++-- pkg/libstack/compose/status_test_files/failed.yml | 2 +- 8 files changed, 19 insertions(+), 17 deletions(-) diff --git a/.github/DISCUSSION_TEMPLATE/ideas.yaml b/.github/DISCUSSION_TEMPLATE/ideas.yaml index cd4b0fb15e..9dd504bb7e 100644 --- a/.github/DISCUSSION_TEMPLATE/ideas.yaml +++ b/.github/DISCUSSION_TEMPLATE/ideas.yaml @@ -3,13 +3,13 @@ body: attributes: value: | # Welcome! - + Thanks for suggesting an idea for Portainer! Before opening a new idea or feature request, make sure that we do not have any duplicates already open. You can ensure this by [searching this discussion category](https://github.com/orgs/portainer/discussions/categories/ideas). If there is a duplicate, please add a comment to the existing idea instead. Also, be sure to check our [knowledge base](https://portal.portainer.io/knowledge) and [documentation](https://docs.portainer.io) as they may point you toward a solution. - + **DO NOT FILE DUPLICATE REQUESTS.** - type: textarea diff --git a/.golangci-forward.yaml b/.golangci-forward.yaml index 5fcd5272be..d1b1125829 100644 --- a/.golangci-forward.yaml +++ b/.golangci-forward.yaml @@ -1,4 +1,4 @@ -version: "2" +version: '2' linters: default: none enable: diff --git a/.golangci.yaml b/.golangci.yaml index 4659ba4710..c27b9ced3a 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,4 +1,4 @@ -version: "2" +version: '2' run: allow-parallel-runners: true @@ -32,7 +32,7 @@ linters: - exptostd settings: staticcheck: - checks: ["all", "-ST1003", "-ST1005", "-ST1016", "-SA1019", "-QF1003"] + checks: ['all', '-ST1003', '-ST1005', '-ST1016', '-SA1019', '-QF1003'] depguard: rules: main: @@ -83,7 +83,7 @@ linters: - ruleguard settings: ruleguard: - rules: "./analysis/ssrf.go" + rules: './analysis/ssrf.go' forbidigo: forbid: - pattern: ^tls\.Config$ @@ -91,9 +91,9 @@ linters: - pattern: ^tls\.Config\.(InsecureSkipVerify|MinVersion|MaxVersion|CipherSuites|CurvePreferences)$ msg: Do not set this field directly, use crypto.CreateTLSConfiguration() instead - pattern: ^object\.(Commit|Tag)\.Verify$ - msg: "Not allowed because of FIPS mode" + msg: 'Not allowed because of FIPS mode' - pattern: ^(types\.SystemContext\.)?(DockerDaemonInsecureSkipTLSVerify|DockerInsecureSkipTLSVerify|OCIInsecureSkipTLSVerify)$ - msg: "Not allowed because of FIPS mode" + msg: 'Not allowed because of FIPS mode' analyze-types: true exclusions: generated: lax diff --git a/.prettierignore b/.prettierignore index 66a69d78d8..6241c7e696 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,5 @@ dist api/datastore/test_data -coverage \ No newline at end of file +coverage + +pnpm-lock.yaml diff --git a/lint-staged.config.js b/lint-staged.config.js index dac60d20c1..9c96ec51b0 100644 --- a/lint-staged.config.js +++ b/lint-staged.config.js @@ -1,6 +1,6 @@ module.exports = { - '*.(js|ts){,x}': 'pnpm run lint', + '*.(js|ts){,x}': 'pnpm eslint --cache --fix', '*.(ts){,x}': () => 'tsc --noEmit', - '*.{js,ts,tsx,css,md,html,json}': 'pnpm run format', + '*.{js,ts,tsx,css,md,html,json}': 'pnpm prettier --log-level warn --write', '*.go': () => 'make lint-server', }; diff --git a/package.json b/package.json index af14e54136..2bdd8dd432 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,8 @@ "dev": "webpack-dev-server", "start": "webpack -w", "build": "webpack", - "format": "prettier --log-level warn --write", - "lint": "eslint --cache --fix", + "format": "prettier --log-level warn --write \"**/*.{js,css,html,jsx,tsx,ts}\"", + "lint": "eslint --cache --fix \"./**/*.{js,jsx,ts,tsx}\"", "test": "vitest run", "sb": "pnpm run storybook", "storybook": "storybook dev -p 6006", @@ -29,7 +29,7 @@ "analyze-webpack": "webpack --config ./webpack/webpack.analyze.js", "typecheck": "tsc --noEmit", "generate-api": "openapi-ts", - "postgenerate-api": "pnpm format app/react/portainer/generated-api/**/*.gen.ts" + "postgenerate-api": "pnpm format" }, "engines": { "node": "^22.22.1" diff --git a/pkg/libstack/compose/docker-compose-test.yml b/pkg/libstack/compose/docker-compose-test.yml index 72d0f467fd..b2ba019e6b 100644 --- a/pkg/libstack/compose/docker-compose-test.yml +++ b/pkg/libstack/compose/docker-compose-test.yml @@ -1,4 +1,4 @@ -version: "3.9" +version: '3.9' services: redis: - image: "redis:alpine" \ No newline at end of file + image: 'redis:alpine' diff --git a/pkg/libstack/compose/status_test_files/failed.yml b/pkg/libstack/compose/status_test_files/failed.yml index a57699b35e..fdd9b3509c 100644 --- a/pkg/libstack/compose/status_test_files/failed.yml +++ b/pkg/libstack/compose/status_test_files/failed.yml @@ -4,4 +4,4 @@ services: image: nginx:latest failing-service: image: busybox - command: ["false"] \ No newline at end of file + command: ['false']