Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

ImportDeclaration.parent is not expected to be a TSModuleDeclaration #217

Closed
@flying-sheep

Description

@flying-sheep

the rule import/newline-after-import accesses a ImportDeclaration’s parent, expecting it to have a body

that’s not true if you encounter a TSModuleDeclarationTSModuleBlockImportDeclaration:

declare module 'postcss-modules' {
	import {Plugin} from 'postcss'
	...
}

a fix for this specific problem would be a visitor like TSModuleDeclaration(m) { m.body = m.statements }

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