Skip to content

newline-after-import breaks #386

Closed
Urigo/tortilla
#68
@ljharb

Description

Cannot read property 'type' of undefined
TypeError: Cannot read property 'type' of undefined
    at getScopeBody ($PWD/node_modules/eslint-plugin-import/lib/rules/newline-after-import.js:30:11)
    at $PWD/node_modules/eslint-plugin-import/lib/rules/newline-after-import.js:104:27
    at Array.forEach (native)
    at $PWD/node_modules/eslint-plugin-import/lib/rules/newline-after-import.js:103:22
    at Array.forEach (native)
    at EventEmitter.ProgramExit ($PWD/node_modules/eslint-plugin-import/lib/rules/newline-after-import.js:99:14)
    at emitOne (events.js:82:20)
    at EventEmitter.emit (events.js:169:7)
    at NodeEventGenerator.leaveNode ($PWD/node_modules/eslint/lib/util/node-event-generator.js:49:22)
    at CodePathAnalyzer.leaveNode ($PWD/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:627:23)
    at CommentEventGenerator.leaveNode ($PWD/node_modules/eslint/lib/util/comment-event-generator.js:110:23)

No idea what file it breaks on, but it started immediately after enabling this rule.

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