Skip to content

Commit 2faae4c

Browse files
committed
fix: @putout/plugin-printer: add-missing-spaces-to-type-checker: after arrow
1 parent e69401f commit 2faae4c

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export const beforeIf = createTypeChecker([
22
['-: -> !', isInsideArray],
33
['-: parentPath ->', isCoupleLines],
4+
['-: parentPath -> !', is],
45
isIdentifierAndIdentifier,
56
isStringAndIdentifierInsideOneElementArray,
67
]);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export const beforeIf = createTypeChecker([
22
['-:->!', isInsideArray],
33
['-:parentPath->', isCoupleLines],
4+
['-:parentPath->!', is],
45
isIdentifierAndIdentifier,
56
isStringAndIdentifierInsideOneElementArray,
67
]);

packages/plugin-printer/lib/add-missing-spaces-to-type-checker/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function traceArrow({includes, endsWith, push}) {
6969
if (!includes(' ->'))
7070
push('before-arrow');
7171

72-
if (!includes(' ->') && !endsWith('->'))
72+
if (!includes('-> ') && !endsWith('->'))
7373
push('after-arrow');
7474
}
7575

0 commit comments

Comments
 (0)