@tsrx/prettier-plugin 0.3.88 → 0.3.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.js +3 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsrx/prettier-plugin",
3
- "version": "0.3.88",
3
+ "version": "0.3.90",
4
4
  "description": "Ripple plugin for Prettier",
5
5
  "type": "module",
6
6
  "module": "src/index.js",
@@ -27,7 +27,7 @@
27
27
  "prettier": "^3.8.4"
28
28
  },
29
29
  "dependencies": {
30
- "@tsrx/core": "0.1.34"
30
+ "@tsrx/core": "0.1.36"
31
31
  },
32
32
  "files": [
33
33
  "src/"
package/src/index.js CHANGED
@@ -1576,10 +1576,6 @@ function printRippleNode(node, path, options, print, args) {
1576
1576
  if (node.typeArguments) {
1577
1577
  parts.push(path.call(print, 'typeArguments'));
1578
1578
  }
1579
- // @ts-expect-error account for future changes as our acorn-typescript is buggy
1580
- else if (node.typeParameters) {
1581
- parts.push(path.call(print, 'typeParameters'));
1582
- }
1583
1579
 
1584
1580
  const argsDoc = printCallArguments(path, options, print);
1585
1581
  parts.push(argsDoc);
@@ -2607,7 +2603,9 @@ function printVariableDeclaration(node, path, options, print) {
2607
2603
  (parentNode && parentNode.type === 'ForInStatement' && parentNode.left === node) ||
2608
2604
  (parentNode &&
2609
2605
  parentNode.type === 'JSXForExpression' &&
2610
- (parentNode.left === node || parentNode.init === node));
2606
+ (parentNode.statementType === 'ForStatement'
2607
+ ? parentNode.init === node
2608
+ : parentNode.left === node));
2611
2609
 
2612
2610
  const declarations = path.map(print, 'declarations');
2613
2611
  const declarationParts = join(', ', declarations);
@@ -4163,11 +4161,6 @@ function printNewExpression(node, path, options, print) {
4163
4161
  if (node.typeArguments) {
4164
4162
  parts.push(path.call(print, 'typeArguments'));
4165
4163
  }
4166
- // @ts-expect-error account for future changes as our acorn-typescript is buggy
4167
- else if (node.typeParameters) {
4168
- // @ts-expect-error
4169
- parts.push(path.call(print, 'typeParameters'));
4170
- }
4171
4164
 
4172
4165
  if (node.arguments && node.arguments.length > 0) {
4173
4166
  parts.push('(');