question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error when linting valid async function with generator-star-spacing rule enabled

See original GitHub issue

Getting TypeError: Cannot read property 'value' of undefined error when linting valid async function with generator-star-spacing rule enabled.

What version of ESLint are you using? 2.11.0 (works in 2.10.* this is the commit that created the issue). What parser (default, Babel-ESLint, etc.) are you using? babel-eslint Please show your full configuration: What did you do? Please include the actual source code causing the issue. See minimum reproduce repository example: https://github.com/doronpr/min-reproduce-eslint-generator-star-spacing

What did you expect to happen? lint should pass.

What actually happened? Please include the actual, raw output from ESLint. The following internal error is thrown

TypeError: Cannot read property 'value' of undefined
    at getStarToken (~/src/min/node_modules/eslint/lib/rules/generator-star-spacing.js:69:25)
    at EventEmitter.checkFunction (~/src/min/node_modules/eslint/lib/rules/generator-star-spacing.js:124:29)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:7
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

21reactions
crossjscommented, Jun 24, 2016

set generator-star-spacing: 0 before babel/generator-star-spacing: 1, it works out for me.

3reactions
hzoocommented, Jul 29, 2016

Well now that it’s stage 4, we can remove that change in babel-eslint once it’s enabled in eslint. Someone can ping me/babel-eslint repo when it happens if I don’t see it myself. https://github.com/babel/babel-eslint/issues/350

Read more comments on GitHub >

github_iconTop Results From Across the Web

generator-star-spacing - ESLint - Pluggable JavaScript Linter
This rule aims to enforce spacing around the * of generator functions. ... If it is true , a space is required, otherwise...
Read more >
14 Linting Rules To Help You Write Asynchronous Code in ...
First, if the async function throws, the error will be lost and won't be rejected by the newly-constructed promise. Second, if await is...
Read more >
1368967 - Enable the ESLint generator-star-spacing rule ...
I updated the patch with corrected tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js...
Read more >
List of available rules - ESLint - Pluggable JavaScript linter
Rules. Rules in ESLint are grouped by category to help you understand their purpose. No rules are enabled by default. The "extends": "eslint:recommended" ......
Read more >
ESLint
quasar/app-webpack) How to configure a code linter in a Quasar app. ... 'vue/valid-v-for': 0, // allow async-await 'generator-star-spacing': 'off', ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found