@putout/plugin-printer 8.10.2 → 8.10.4

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.
@@ -61,6 +61,9 @@ export const traverse = ({push}) => ({
61
61
 
62
62
  const type = value.slice(typeNotIndex, value.length);
63
63
 
64
+ if (!type)
65
+ return;
66
+
64
67
  if (!isTypeExists(type))
65
68
  push({
66
69
  path,
@@ -17,6 +17,9 @@ const prepareValue = (a) => {
17
17
  if (a.endsWith('!'))
18
18
  return a;
19
19
 
20
+ if (!a.endsWith('->'))
21
+ return `${a} -> `;
22
+
20
23
  return `${a} `;
21
24
  };
22
25
 
@@ -60,6 +63,9 @@ export const traverse = ({push}) => ({
60
63
 
61
64
  const name = cutIS(checkerName);
62
65
 
66
+ if (!name)
67
+ continue;
68
+
63
69
  if (isTypeExists(name))
64
70
  push({
65
71
  path: element,
package/lib/types.js CHANGED
@@ -4,9 +4,7 @@ const TYPES_EXISTS = new Set([
4
4
  'CommentBlock',
5
5
  ]);
6
6
 
7
- const TYPES_NOT_EXISTS = new Set([
8
- 'ExportDeclaration',
9
- ]);
7
+ const TYPES_NOT_EXISTS = new Set(['ExportDeclaration']);
10
8
 
11
9
  export function isTypeExists(type) {
12
10
  if (TYPES_NOT_EXISTS.has(type))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-printer",
3
- "version": "8.10.2",
3
+ "version": "8.10.4",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout plugin adds support of transformations for @putout/printer",