Skip to content

Commit

Permalink
Merge pull request 'feat/configure-treefmt-pipeline' (#32) from feat/…
Browse files Browse the repository at this point in the history
…configure-treefmt-pipeline into main

Reviewed-on: https://git.numtide.com/numtide/treefmt/pulls/32
  • Loading branch information
Brian McGee committed May 1, 2024
2 parents 5d341f9 + 757d5e7 commit d3cdb69
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 21 deletions.
11 changes: 6 additions & 5 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
flake-parts.url = "github:hercules-ci/flake-parts";
flake-root.url = "github:srid/flake-root";
treefmt-nix = {
url = "github:numtide/treefmt-nix";
# todo switch back to numtide/treefmt-nix once merged
url = "github:brianmcgee/treefmt-nix/feat/pipelines";
inputs.nixpkgs.follows = "nixpkgs";
};
devshell = {
Expand Down
4 changes: 3 additions & 1 deletion nix/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
in
filter {
root = ../.;
exclude = [./nix];
exclude = [
"nix"
];
};

modules = ../gomod2nix.toml;
Expand Down
45 changes: 31 additions & 14 deletions nix/treefmt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,37 @@
statix.enable = true;
};

settings.formatter.prettier = {
options = ["--tab-width" "4"];
includes = [
"*.css"
"*.html"
"*.js"
"*.json"
"*.jsx"
"*.md"
"*.mdx"
"*.scss"
"*.ts"
"*.yaml"
];
settings.formatter = {
deadnix = {
pipeline = "nix";
priority = 1;
};

statix = {
pipeline = "nix";
priority = 2;
};

alejandra = {
pipeline = "nix";
priority = 3;
};

prettier = {
options = ["--tab-width" "4"];
includes = [
"*.css"
"*.html"
"*.js"
"*.json"
"*.jsx"
"*.md"
"*.mdx"
"*.scss"
"*.ts"
"*.yaml"
];
};
};
};

Expand Down

0 comments on commit d3cdb69

Please sign in to comment.