I'm using ESLint to analyze my code. The code runs fine, but I get this error from eslint
:
[eslint] Parsing error: Unexpected token t
(parameter) t: any
test.serial('set: Handles save error', async t => {
// function definition
});
Here's .eslintrc.js
module.exports = {
extends: 'google',
parserOptions: {
ecmaVersion: 6
}
};
async
/await
is an ECMAScript 2017 feature, so if you change ecmaVersion: 8
instead of 6, this should work!
I had a similar problem and solve editing the package.json line 5.
I removed " ." that's after "eslint" and everything is fine now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With