Skip to content

Commit

Permalink
Merge pull request #362 from replit/bm/format-nodejs-supports-range-f…
Browse files Browse the repository at this point in the history
…ormatting

Mark prettier as supporting range formatting
  • Loading branch information
bradymadden97 authored Jun 25, 2024
2 parents 1835908 + ae22bf0 commit ad0eff3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkgs/moduleit/module-definition.nix
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,14 @@ let
Whether to pass in file contents from stdin or from $file parameter.
'';
};

supportsRangeFormatting = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Whether the formatter supports range formatting
'';
};
} // fileTypeAttrs;
};

Expand Down
1 change: 1 addition & 0 deletions pkgs/modules/nodejs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ in
args = [ "${run-prettier}/bin/run-prettier" "--stdin-filepath" "-f" "$file" ];
};
stdin = true;
supportsRangeFormatting = true;
};

dev.packagers.upmNodejs = {
Expand Down

0 comments on commit ad0eff3

Please sign in to comment.