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
Description
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 TSModuleDeclaration
→ TSModuleBlock
→ ImportDeclaration
:
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 }