From c0d2a028bb46e37c52911273cb3b8e7dcfd496c1 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Tue, 8 Mar 2022 21:32:22 +0100 Subject: [PATCH] feat(ng-dev): format yaml files with prettier by default --- ng-dev/format/formatters/prettier.ts | 7 ++++++- tools/local-actions/changelog/main.js | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ng-dev/format/formatters/prettier.ts b/ng-dev/format/formatters/prettier.ts index 3d83902d7..528e2196a 100644 --- a/ng-dev/format/formatters/prettier.ts +++ b/ng-dev/format/formatters/prettier.ts @@ -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 diff --git a/tools/local-actions/changelog/main.js b/tools/local-actions/changelog/main.js index 84335aee4..59e08c7a2 100644 --- a/tools/local-actions/changelog/main.js +++ b/tools/local-actions/changelog/main.js @@ -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: {