Skip to content

Commit

Permalink
fix(typescript-estree): remove now defunct Import node type
Browse files Browse the repository at this point in the history
  • Loading branch information
bradzacher committed May 21, 2020
1 parent a35026d commit f199cbd
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 14 deletions.
4 changes: 2 additions & 2 deletions packages/eslint-plugin/src/rules/no-unsafe-call.ts
Expand Up @@ -42,8 +42,8 @@ export default util.createRule<[], MessageIds>({
}

return {
':matches(CallExpression, OptionalCallExpression) > :not(Import).callee'(
node: Exclude<TSESTree.LeftHandSideExpression, TSESTree.Import>,
':matches(CallExpression, OptionalCallExpression) > *.callee'(
node: TSESTree.CallExpression['callee'],
): void {
checkCall(node, node, 'unsafeCall');
},
Expand Down
2 changes: 1 addition & 1 deletion packages/experimental-utils/src/ts-eslint/Rule.ts
Expand Up @@ -281,9 +281,9 @@ interface RuleListener {
FunctionExpression?: RuleFunction<TSESTree.FunctionExpression>;
Identifier?: RuleFunction<TSESTree.Identifier>;
IfStatement?: RuleFunction<TSESTree.IfStatement>;
Import?: RuleFunction<TSESTree.Import>;
ImportDeclaration?: RuleFunction<TSESTree.ImportDeclaration>;
ImportDefaultSpecifier?: RuleFunction<TSESTree.ImportDefaultSpecifier>;
ImportExpression?: RuleFunction<TSESTree.ImportExpression>;
ImportNamespaceSpecifier?: RuleFunction<TSESTree.ImportNamespaceSpecifier>;
ImportSpecifier?: RuleFunction<TSESTree.ImportSpecifier>;
JSXAttribute?: RuleFunction<TSESTree.JSXAttribute>;
Expand Down
5 changes: 0 additions & 5 deletions packages/typescript-estree/src/convert.ts
Expand Up @@ -1992,11 +1992,6 @@ export class Converter {
}
}

case SyntaxKind.ImportKeyword:
return this.createNode<TSESTree.Import>(node, {
type: AST_NODE_TYPES.Import,
});

case SyntaxKind.EmptyStatement:
return this.createNode<TSESTree.EmptyStatement>(node, {
type: AST_NODE_TYPES.EmptyStatement,
Expand Down
6 changes: 0 additions & 6 deletions packages/typescript-estree/src/ts-estree/ts-estree.ts
Expand Up @@ -172,7 +172,6 @@ export type Node =
| FunctionExpression
| Identifier
| IfStatement
| Import
| ImportDeclaration
| ImportDefaultSpecifier
| ImportExpression
Expand Down Expand Up @@ -447,7 +446,6 @@ export type PrimaryExpression =
| ClassExpression
| FunctionExpression
| Identifier
| Import
| JSXElement
| JSXFragment
| JSXOpeningElement
Expand Down Expand Up @@ -956,10 +954,6 @@ export interface IfStatement extends BaseNode {
alternate: Statement | null;
}

export interface Import extends BaseNode {
type: AST_NODE_TYPES.Import;
}

export interface ImportDeclaration extends BaseNode {
type: AST_NODE_TYPES.ImportDeclaration;
source: Literal;
Expand Down

0 comments on commit f199cbd

Please sign in to comment.