ci: enforce prettier formatting #488

merged
opened by winter.bsky.social targeting master from push-pzwzzlwkkpnw
Changed files
+30
.tangled
workflows
+13
.prettierignore
··· 1 + flake.lock 2 + 3 + # for now, we don't want these formatted, but let's consider it in the future? 4 + *.json 5 + *.md 6 + *.yml 7 + *.yaml 8 + *.jsonc 9 + *.json 10 + 11 + # causes Go template plugin errors: https://github.com/NiklasPor/prettier-plugin-go-template/issues/120 12 + appview/pages/templates/layouts/repobase.html 13 + appview/pages/templates/repo/tags.html
+10
.prettierrc
··· 1 + { 2 + "overrides": [ 3 + { 4 + "files": ["*.html"], 5 + "options": { 6 + "parser": "go-template" 7 + } 8 + } 9 + ] 10 + }
+3
.tangled/workflows/fmt.yml
··· 17 17 unformatted=$(gofmt -l .) 18 18 test -z "$unformatted" || (echo "$unformatted" && exit 1) 19 19 20 + - name: "prettier" 21 + command: | 22 + nix develop -c "prettier -c ."
+4
flake.nix
··· 129 129 pkgs.redis 130 130 pkgs.coreutils # for those of us who are on systems that use busybox (alpine) 131 131 packages'.lexgen 132 + (pkgs.runCommand "prettier-wrapper" {nativeBuildInputs = [pkgs.makeWrapper];} '' 133 + mkdir -p "$out/bin" 134 + makeWrapper ${pkgs.prettier}/bin/prettier "$out/bin/prettier" --add-flags "--plugin=${pkgs.prettier-plugin-go-template}/lib/node_modules/prettier-plugin-go-template/lib/index.js" 135 + '') 132 136 ]; 133 137 shellHook = '' 134 138 mkdir -p appview/pages/static