Skip to content

Commit

Permalink
refactor: deprecate rome with mkRenamedOptionModule
Browse files Browse the repository at this point in the history
  • Loading branch information
oxcabe committed Apr 16, 2024
1 parent d2b7a5b commit 8b255d0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/hooks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ in
})
# Rename the remaining `settings.<name>` to `hooks.<name>.settings`
++ map (name: mkRenamedOptionModule [ "settings" name ] [ "hooks" name "settings" ])
[ "ansible-lint" "autoflake" "biome" "clippy" "cmake-format" "credo" "deadnix" "denofmt" "denolint" "dune-fmt" "eslint" "flake8" "headache" "hlint" "hpack" "isort" "latexindent" "lychee" "mkdocs-linkcheck" "mypy" "nixfmt" "ormolu" "php-cs-fixer" "phpcbf" "phpcs" "phpstan" "prettier" "psalm" "pylint" "pyright" "pyupgrade" "revive" "rome" "statix" ];
[ "ansible-lint" "autoflake" "biome" "clippy" "cmake-format" "credo" "deadnix" "denofmt" "denolint" "dune-fmt" "eslint" "flake8" "headache" "hlint" "hpack" "isort" "latexindent" "lychee" "mkdocs-linkcheck" "mypy" "nixfmt" "ormolu" "php-cs-fixer" "phpcbf" "phpcs" "phpstan" "prettier" "psalm" "pylint" "pyright" "pyupgrade" "revive" "statix" ]
# Rename `rome` hook to `biome`, since `biome` was being used in both hooks
++ [ (mkRenamedOptionModule [ "hooks" "rome" ] [ "hooks" "biome" ]) ];

options.hookModule = lib.mkOption {
type = types.deferredModule;
Expand All @@ -73,7 +75,7 @@ in
};

# PLEASE keep this sorted alphabetically.
options.hooks = rec
options.hooks =
{
alejandra = mkOption {
description = lib.mdDoc "alejandra hook";
Expand Down Expand Up @@ -1313,7 +1315,6 @@ in
};
};
};
rome = biome;
rustfmt = mkOption {
description = lib.mdDoc ''
Additional rustfmt settings
Expand Down Expand Up @@ -1639,7 +1640,7 @@ in
};

# PLEASE keep this sorted alphabetically.
config.hooks = mapAttrs (_: mapAttrs (_: mkDefault)) rec
config.hooks = mapAttrs (_: mapAttrs (_: mkDefault))
{
actionlint =
{
Expand Down Expand Up @@ -3078,7 +3079,6 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.ormol
"${hooks.ripsecrets.package}/bin/ripsecrets ${cmdArgs}";
types = [ "text" ];
};
rome = biome;
ruff =
{
name = "ruff";
Expand Down

0 comments on commit 8b255d0

Please sign in to comment.