microsoft/typespec

Public

mirrored from https://github.com/microsoft/typespecAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
f5be43b02a71f3cdbe563af80c287f6b4567c119

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

eng/scripts/check-format.js

13lines · modecode

1import { runPrettier, CommandFailedError } from "./helpers.js";
2
3try {
4 runPrettier("--list-different");
5} catch (err) {
6 if (err instanceof CommandFailedError) {
7 console.error(
8 "\nERROR: Files above are not formatted correctly. Run `rush format` and commit the changes."
9 );
10 process.exit(err.proc?.status ?? 1);
11 }
12 throw err;
13}
14