diff --git a/flake.nix b/flake.nix index d0ca393b..291b5a76 100644 --- a/flake.nix +++ b/flake.nix @@ -263,17 +263,27 @@ excludes = ["**/src/_lex/**"]; }; - # prettier = let - # wrapper = pkgs.runCommandLocal "prettier-wrapper" {nativeBuildInputs = [pkgs.makeWrapper];} '' - # makeWrapper ${pkgs.prettier}/bin/prettier "$out" --add-flags "--plugin=${pkgs.prettier-plugin-go-template}/lib/node_modules/prettier-plugin-go-template/lib/index.js" - # ''; - # in { - # command = wrapper; - # options = ["-w"]; - # includes = ["*.html"]; - # # causes Go template plugin errors: https://github.com/NiklasPor/prettier-plugin-go-template/issues/120 - # excludes = ["appview/pages/templates/layouts/repobase.html" "appview/pages/templates/repo/tags.html"]; - # }; + prettier = { + command = pkgs.lib.getExe pkgs.prettier; + options = ["-w"]; + includes = [ + "web/**/*.cjs" + "web/**/*.css" + "web/**/*.html" + "web/**/*.js" + "web/**/*.json" + "web/**/*.json5" + "web/**/*.jsx" + "web/**/*.mdx" + "web/**/*.mjs" + "web/**/*.scss" + "web/**/*.ts" + "web/**/*.tsx" + "web/**/*.vue" + "web/**/*.yaml" + "web/**/*.yml" + ]; + }; }; };