diff --git a/parts/programs/default.nix b/parts/programs/default.nix index 6555fca1..319d4d40 100644 --- a/parts/programs/default.nix +++ b/parts/programs/default.nix @@ -2,7 +2,7 @@ imports = [ ./deploy.nix # a setup for deploy-rs, which allows us to remotely build and deploy our flake ./formatter.nix # formatter for nix fmt, via treefmt is a formatter for every language - ./pre-commit.nix # git hooks to help manage the flake + ./git-hooks.nix # git hooks to help manage the flake ./shell.nix # a dev shell that provieds all that you will need to work ]; } diff --git a/parts/programs/pre-commit.nix b/parts/programs/git-hooks.nix similarity index 94% rename from parts/programs/pre-commit.nix rename to parts/programs/git-hooks.nix index 97a83891..19dd1eed 100644 --- a/parts/programs/pre-commit.nix +++ b/parts/programs/git-hooks.nix @@ -40,6 +40,7 @@ # ensure we have nice formatting prettier = mkHook' "prettier" { settings.write = true; }; treefmt = mkHook' "treefmt" { package = config.treefmt.build.wrapper; }; + stylua = mkHook "stylua"; editorconfig-checker = mkHook' "editorconfig" { enable = lib.mkForce false; always_run = true; @@ -48,6 +49,9 @@ package = pkgs.nixfmt-rfc-style; }; + # check for dead links + lychee = mkHook "lychee"; + # make sure there are no typos in the code typos = mkHook' "typos" { settings = { diff --git a/stylua.toml b/stylua.toml new file mode 100644 index 00000000..59579754 --- /dev/null +++ b/stylua.toml @@ -0,0 +1,9 @@ +indent_type = "Spaces" +indent_width = 2 +column_width = 120 +quote_style = "AutoPreferDouble" +call_parentheses = "Always" +line_endings = "Unix" + +[sort_requires] +enabled = true