Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

v10.0.0: TypeError: Cannot read property 'range' of null #695

Closed
johngeorgewright opened this issue Sep 26, 2018 · 1 comment
Closed

v10.0.0: TypeError: Cannot read property 'range' of null #695

johngeorgewright opened this issue Sep 26, 2018 · 1 comment

Comments

@johngeorgewright
Copy link

Just tried updating my version of babel-eslint to v10(using eslint v5.6) and received an error of which I'm unsure how to get around.

Cannot read property 'range' of null
TypeError: Cannot read property 'range' of null
    at SourceCode.getTokenBefore (...node_modules/eslint/lib/token-store/index.js:303:18)
    at checkFunction (...node_modules/eslint/lib/rules/space-before-function-paren.js:117:42)
    at listeners.(anonymous function).forEach.listener (...node_modules/eslint/lib/util/safe-emitter.js:45:58)
    at Array.forEach (<anonymous>)
    at Object.emit (...node_modules/eslint/lib/util/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (...node_modules/eslint/lib/util/node-event-generator.js:251:26)
    at NodeEventGenerator.applySelectors (...node_modules/eslint/lib/util/node-event-generator.js:280:22)
    at NodeEventGenerator.enterNode (...node_modules/eslint/lib/util/node-event-generator.js:294:14)
    at CodePathAnalyzer.enterNode (...node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:632:23)
    at nodeQueue.forEach.traversalInfo (...node_modules/eslint/lib/linter.js:860:28)

My eslint config:

module.exports = {
  extends: [
    'plugin:flowtype/recommended',
    'standard'
  ],
  parser: 'babel-eslint',
  plugins: [
    'flowtype'
  ]
}
@johngeorgewright johngeorgewright changed the title v10.0.0 Cannot read property 'range' of null v10.0.0: TypeError: Cannot read property 'range' of null Sep 26, 2018
@hzoo
Copy link
Member

hzoo commented Sep 26, 2018

I believe this is the same issue as #691 so just going to merge this into that one.

Duplicate of #691

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants