Skip to content

Commit 36a6541

Browse files
committed
fix: @putout/plugin-putout: add-path-arg-to-filter: no body
1 parent 5a66309 commit 36a6541

4 files changed

Lines changed: 9 additions & 2 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const filter = (path) => path.node.async;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const filter = () => path.node.async;

packages/plugin-putout/lib/add-path-arg-to-filter/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ export const {
99
} = addArgs({
1010
path: ['path', {
1111
include: [
12-
'export const filter = () => __body',
13-
'module.exports.filter = () => __body',
12+
'export const filter = () => __',
13+
'module.exports.filter = () => __',
1414
],
1515
}],
1616
});

packages/plugin-putout/lib/add-path-arg-to-filter/index.spec.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,8 @@ test('putout: add-path-arg-to-filter: transform: member', (t) => {
2121
t.transform('member');
2222
t.end();
2323
});
24+
25+
test('putout: add-path-arg-to-filter: transform: no-body', (t) => {
26+
t.transform('no-body');
27+
t.end();
28+
});

0 commit comments

Comments
 (0)