Strip Flow's new shorthand import-type specifiers
This commit is contained in:
@@ -105,7 +105,7 @@ export let Pure = {
|
||||
};
|
||||
|
||||
export let Flow = {
|
||||
types: ["Flow", "ImportDeclaration", "ExportDeclaration"],
|
||||
types: ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"],
|
||||
checkPath({ node }: NodePath): boolean {
|
||||
if (t.isFlow(node)) {
|
||||
return true;
|
||||
@@ -113,6 +113,8 @@ export let Flow = {
|
||||
return node.importKind === "type" || node.importKind === "typeof";
|
||||
} else if (t.isExportDeclaration(node)) {
|
||||
return node.exportKind === "type";
|
||||
} else if (t.isImportSpecifier(node)) {
|
||||
return node.importKind === "type" || node.importKind === "typeof";
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user