error when linting valid async function with generator-star-spacing rule enabled
See original GitHub issueGetting 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:
- Created 7 years ago
- Reactions:7
- Comments:14 (11 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
set
generator-star-spacing: 0
beforebabel/generator-star-spacing: 1
, it works out for me.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