Skip to content

Commit

Permalink
Remove prettier2.0 support in prettier plugin (#2956)
Browse files Browse the repository at this point in the history
fix #2760 
`@typespec/prettier-plugin-typespec` dropped support for prettier 2.0.
Update to 3.0 to use the new version of the plugin.
  • Loading branch information
timotheeguerin authored Feb 28, 2024
1 parent 66c2df1 commit 628517e
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 74 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: breaking
packages:
- "@typespec/prettier-plugin-typespec"
---

Drop support for prettier 2.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: internal
packages:
- "@typespec/compiler"
---

Drop support for prettier 2.0
3 changes: 1 addition & 2 deletions packages/compiler/src/formatter/print/needs-parens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ export function needsParens(path: AstPath<Node>, options: TypeSpecPrettierOption
return false;
}

// eslint-disable-next-line deprecation/deprecation
const node = path.getValue();
const node = path.node;
switch (node.kind) {
case SyntaxKind.ValueOfExpression:
return (
Expand Down
Loading

0 comments on commit 628517e

Please sign in to comment.