mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 19:46:11 +01:00
remove deprecated formatters
This commit is contained in:
parent
3eda27f1ca
commit
bd2255044c
1 changed files with 8 additions and 24 deletions
30
treefmt.nix
30
treefmt.nix
|
|
@ -1,9 +1,9 @@
|
|||
{ lib, inputs, ... }: {
|
||||
{ inputs, ... }: {
|
||||
imports = [
|
||||
inputs.treefmt-nix.flakeModule
|
||||
];
|
||||
|
||||
perSystem = { pkgs, ... }: {
|
||||
perSystem = _: {
|
||||
treefmt = {
|
||||
# Used to find the project root
|
||||
projectRootFile = "flake.lock";
|
||||
|
|
@ -12,33 +12,17 @@
|
|||
deadnix.enable = true;
|
||||
deno.enable = true;
|
||||
mypy.enable = true;
|
||||
ruff.check = true;
|
||||
ruff.format = true;
|
||||
nixpkgs-fmt.enable = true;
|
||||
shellcheck.enable = true;
|
||||
shfmt.enable = true;
|
||||
statix.enable = true;
|
||||
};
|
||||
|
||||
settings.formatter =
|
||||
let
|
||||
sh-includes = [ "*.sh" "direnvrc" ];
|
||||
in
|
||||
{
|
||||
python = {
|
||||
command = "sh";
|
||||
options = [
|
||||
"-eucx"
|
||||
''
|
||||
${lib.getExe pkgs.ruff} --fix "$@"
|
||||
${lib.getExe pkgs.ruff} format "$@"
|
||||
''
|
||||
"--" # this argument is ignored by bash
|
||||
];
|
||||
includes = [ "*.py" ];
|
||||
};
|
||||
|
||||
shellcheck.includes = sh-includes;
|
||||
|
||||
shfmt.includes = sh-includes;
|
||||
settings.formatter = {
|
||||
shellcheck.includes = [ "*.sh" "direnvrc" ];
|
||||
shfmt.includes = [ "*.sh" "direnvrc" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue