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 in the generator-star-spacing rule

See original GitHub issue

What 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:closed
  • Created 7 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ilyavolodincommented, Aug 6, 2016

@ljharb It’s still not implemented in Acorn/Espree, so I think we should hold off till we can actually implant this change.

0reactions
ljharbcommented, Aug 6, 2016
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. 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 >

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