Skip to content

"no-multi-spaces" will effect js file and throw a error #161

Closed
@weizhenye

Description

@weizhenye

Tell us about your environment

  • ESLint Version: 4.4.1
  • eslint-plugin-vue Version: 3.12.0
  • Node Version: 8.4.0

Please show your full configuration:

"vue/no-multi-spaces": 2,

What did you do? Please include the actual source code causing the issue.

eslint src/ --ext=js,vue

What did you expect to happen?

What actually happened? Please include the actual, raw output from ESLint.

Cannot read property 'range' of undefined
TypeError: Cannot read property 'range' of undefined
    at TokenStore.getTokens (xxx\node_modules\eslint\lib\token-store\index.js:528:17)
    at Linter.Program (xxx\node_modules\eslint-plugin-vue\lib\rules\no-multi-spaces.js:42:35)
    at emitOne (events.js:120:20)
    at Linter.emit (events.js:210:7)
    at NodeEventGenerator.applySelector (xxx\node_modules\eslint\lib\util\node-event-generator.js:265:26)
    at NodeEventGenerator.applySelectors (xxx\node_modules\eslint\lib\util\node-event-generator.js:294:22)
    at NodeEventGenerator.enterNode (xxx\node_modules\eslint\lib\util\node-event-generator.js:308:14)
    at CodePathAnalyzer.enterNode (xxx\node_modules\eslint\lib\code-path-analysis\code-path-analyzer.js:602:23)
    at Traverser.enter (xxx\node_modules\eslint\lib\linter.js:925:36)
    at Traverser.__execute (xxx\node_modules\estraverse\estraverse.js:397:31)

After I enable the no-multi-spaces rule, it will lint js file and throw a error showed above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions