error in the generator-star-spacing rule
See original GitHub issueWhat version of ESLint are you using?
$ node_modules/.bin/eslint -v
v2.13.1
What parser (default, Babel-ESLint, etc.) are you using?
babel-eslint
Please show your full configuration:
parser: babel-eslint
extends: standard
plugins:
- flowtype
env:
node: true
mocha: true
rules:
# allow dangling comma
no-comma-dangle: off
comma-dangle:
- error
- always-multiline
flowtype/space-after-type-colon:
- error
- always
flowtype/space-before-type-colon:
- error
- always
no-var:
- error
no-console:
- error
What did you do? Please include the actual source code causing the issue.
$ eslint src/
What did you expect to happen?
No error to happen, just lint.
What actually happened? Please include the actual, raw output from ESLint.
Got the error
/Users/romeo/code/go/foo/node_modules/eslint/lib/rules/generator-star-spacing.js:69
while (token.value !== "*") {
^
TypeError: Cannot read property 'value' of undefined
at getStarToken (/Users/romeo/code/go/foo/node_modules/eslint/lib/rules/generator-star-spacing.js:69:25)
at EventEmitter.checkFunction (/Users/romeo/code/go/foo/node_modules/eslint/lib/rules/generator-star-spacing.js:125:29)
at emitOne (events.js:82:20)
at EventEmitter.emit (events.js:169:7)
at NodeEventGenerator.enterNode (/Users/romeo/code/go/foo/node_modules/eslint/lib/util/node-event-generator.js:40:22)
at CodePathAnalyzer.enterNode (/Users/romeo/code/go/foo/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:607:23)
at CommentEventGenerator.enterNode (/Users/romeo/code/go/foo/node_modules/eslint/lib/util/comment-event-generator.js:97:23)
at Controller.traverser.traverse.enter (/Users/romeo/code/go/foo/node_modules/eslint/lib/eslint.js:905:36)
at Controller.__execute (/Users/romeo/code/go/foo/node_modules/eslint/node_modules/estraverse/estraverse.js:397:31)
at Controller.traverse (/Users/romeo/code/go/foo/node_modules/eslint/node_modules/estraverse/estraverse.js:501:28)
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (7 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. Options. The rule takes one option, an object, which has two...
Read more >Enable the ESLint generator-star-spacing rule across mozilla ...
Bug 1368967 - Enable the ESLint generator-star-spacing rule across ... Remove the generator-star-spacing lines from the other .eslintrc.js files (* apart ...
Read more >generator-star: enforce consistent spacing around the asterisk in ...
This rule enforces that the * is either placed next to the function keyword or the name of the function. The single option...
Read more >Airbnb JavaScript Style Guide()
This eliminates any assumptions made about the Error's call stack. ... make sure their function signature is spaced properly. eslint: generator-star-spacing.
Read more >ValidateJavaScript - Online Tool to Find & Fix JavaScript Errors
Find & Fix JavaScript Errors. Settings. Config: ... Rules: eslint. accessor-pairs array-bracket-newline ... generator-star-spacing getter-return
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 FreeTop 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
Top GitHub Comments
@ljharb It’s still not implemented in Acorn/Espree, so I think we should hold off till we can actually implant this change.
Sounds good! Linking to https://github.com/ternjs/acorn/issues/441 and https://github.com/eslint/espree/issues/287