From e55218b8f03a02091cf9f3172dfebccbd344ac3d Mon Sep 17 00:00:00 2001 From: Will Harney Date: Tue, 16 Jul 2024 13:02:21 -0400 Subject: [PATCH 1/3] chore(dependabot): ignore prettier v3 --- .github/dependabot.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8735790e3e..fb64f84445 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -18,3 +18,8 @@ updates: # We are pinned to Tachometer 0.5.10 due to a breaking change in 0.6.0. # See: https://github.com/google/tachometer/issues/244 - dependency-name: 'tachometer' + # TODO [#]: + - dependency-name: 'prettier' + versions: '>= 3' + - dependency-name: '@types/prettier' + versions: '>= 3' From f3c9dea52fcd39da3a473ca21d0ce34eef7b3702 Mon Sep 17 00:00:00 2001 From: Will Harney Date: Tue, 16 Jul 2024 13:03:52 -0400 Subject: [PATCH 2/3] chore(prettier): prepare for v3 use v2 value for trailingComma add note to places that will need updates --- .prettierrc | 3 ++- packages/@lwc/template-compiler/src/__tests__/fixtures.spec.ts | 1 + scripts/tasks/generate-license-files.js | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.prettierrc b/.prettierrc index 581887eed8..edc17868b9 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,5 +1,6 @@ { "printWidth": 100, "singleQuote": true, - "tabWidth": 4 + "tabWidth": 4, + "trailingComma": "es5" } diff --git a/packages/@lwc/template-compiler/src/__tests__/fixtures.spec.ts b/packages/@lwc/template-compiler/src/__tests__/fixtures.spec.ts index c75c5afb11..6bf5849a6d 100644 --- a/packages/@lwc/template-compiler/src/__tests__/fixtures.spec.ts +++ b/packages/@lwc/template-compiler/src/__tests__/fixtures.spec.ts @@ -38,6 +38,7 @@ describe('fixtures', () => { ); return { + // TODO [#4386]: Prettier v3 returns a promise - add an `await` here 'expected.js': prettier.format(code, { parser: 'babel' }), 'ast.json': JSON.stringify({ root }, null, 4), 'metadata.json': JSON.stringify({ warnings }, null, 4), diff --git a/scripts/tasks/generate-license-files.js b/scripts/tasks/generate-license-files.js index 3cc0f1a604..e042d6769d 100644 --- a/scripts/tasks/generate-license-files.js +++ b/scripts/tasks/generate-license-files.js @@ -60,6 +60,7 @@ async function main() { '\n' )}`.trim() + '\n'; + // TODO [#4386]: Prettier v3 returns a promise - add an `await` here const formattedLicense = prettier.format(newLicense, { parser: 'markdown', }); From b37800a4a76b1459c472ba8fb1b49aa6509a2bfc Mon Sep 17 00:00:00 2001 From: Will Harney Date: Tue, 16 Jul 2024 13:10:56 -0400 Subject: [PATCH 3/3] chore(dependabot): add issue number for prettier TODO --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index fb64f84445..595f528bef 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -18,7 +18,7 @@ updates: # We are pinned to Tachometer 0.5.10 due to a breaking change in 0.6.0. # See: https://github.com/google/tachometer/issues/244 - dependency-name: 'tachometer' - # TODO [#]: + # TODO [#4386]: Stop ignoring when we've done the upgrade ourselves - dependency-name: 'prettier' versions: '>= 3' - dependency-name: '@types/prettier'