-
Notifications
You must be signed in to change notification settings - Fork 352
Function call brackets closes incorrectly when have ES6 arrow function as argument #378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yup, known issue. We'll get a fix out shortly! |
Things should be sort of fixed for now in @unclechu I am working on another PR to bring some of the old functionality back, do you mind posting your screenshot snippets as code examples? So I can work them into a test file for the next update? The more crazier examples you can provide that you actually end up using, would be super helpful! |
@amadeus just wanted to say thanks for your work on this, and generally for your work on this repo. As a user it's awesome to see issues being fixed so quickly, and I really appreciate it :) |
const f = func('_.foo()', () => {}); const async = require('async');
const fs = require('fs');
async.waterfall([
(cb) => cb(null, 'file.txt'),
(path, cb) => fs.exists(path, (exists) => cb(null, exists)),
], (err, exists) => { if (err) console.error(err); else console.log('exists:', exists) }); |
const found = _.find(headers, (it) => /^Content-Length: \d\+$/i.test(it)); |
@unclechu these are great, thanks! |
This issue should be fixed in |
Also arrow function single argument without brackets example: const found = _.find(headers, it => /^Content-Length: \d\+$/i.test(it)); const async = require('async');
const fs = require('fs');
async.waterfall([
cb => cb(null, 'file.txt'),
(path, cb) => fs.exists(path, (exists) => cb(null, exists)),
], (err, exists) => { if (err) console.error(err); else console.log('exists:', exists) }); |
@amadeus now it works nice, thanks a lot! |
I hope this screenshots will explain a lot:


Here the text example:
The text was updated successfully, but these errors were encountered: