Skip to content

Commit

Permalink
feat(ng-dev): format yaml files with prettier by default
Browse files Browse the repository at this point in the history
  • Loading branch information
devversion committed Mar 8, 2022
1 parent 02a2e26 commit c0d2a02
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion ng-dev/format/formatters/prettier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ export class Prettier extends Formatter {

override binaryFilePath = join(this.git.baseDir, 'node_modules/.bin/prettier');

override defaultFileMatcher = ['**/*.{js,cjs,mjs}', '**/*.{ts,cts,mts}', '**/*.json'];
override defaultFileMatcher = [
'**/*.{js,cjs,mjs}',
'**/*.{ts,cts,mts}',
'**/*.json',
'**/*.{yml,yaml}',
];

/**
* The configuration path of the prettier config, obtained during construction to prevent needing
Expand Down
7 changes: 6 additions & 1 deletion tools/local-actions/changelog/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -48493,7 +48493,12 @@ var require_prettier = __commonJS({
super(...arguments);
this.name = "prettier";
this.binaryFilePath = (0, path_12.join)(this.git.baseDir, "");
this.defaultFileMatcher = ["**/*.{js,cjs,mjs}", "**/*.{ts,cts,mts}", "**/*.json"];
this.defaultFileMatcher = [
"**/*.{js,cjs,mjs}",
"**/*.{ts,cts,mts}",
"**/*.json",
"**/*.{yml,yaml}"
];
this.configPath = this.config["prettier"] ? (0, child_process_1.spawnSync)(this.binaryFilePath, ["--find-config-path", "."]).stdout.trim() : "";
this.actions = {
check: {
Expand Down

0 comments on commit c0d2a02

Please sign in to comment.