I keep getting a SyntaxError: Unexpected token )'
error for the following code:
passport.use(
'local-signup',
new LocalStrategy({
usernameField: 'email',
passwordField: 'password',
passReqToCallback: true, // pass back req to callback
},
(req, email, password, done) => {
// ...
},
),
);
It really only started after I put arrow functions in. I think I'm missing something syntax-wise. I'm using the airbnb style guide & linter btw. Running Node.js LTS. VS Code doesn't give any parsing errors either in the editor itself. The code works when transpiled to ES2015 via Babel. I'm still curious why it isn't working with the ES6 syntax.