Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Josh Goldberg <me@joshuakgoldberg.com>
  • Loading branch information
idan-at and JoshuaKGoldberg committed Oct 17, 2021
1 parent fbbb87f commit 2b00d98
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/eslint-plugin/src/rules/no-shadow.ts
Expand Up @@ -237,8 +237,7 @@ export default util.createRule<Options, MessageIds>({
node: TSESTree.Node | null,
): node is TSESTree.StringLiteral {
return (
!!node &&
node.type === AST_NODE_TYPES.Literal &&
node?.type === AST_NODE_TYPES.Literal &&
typeof node.value === 'string'
);
}
Expand Down Expand Up @@ -266,7 +265,6 @@ export default util.createRule<Options, MessageIds>({
return (
isTypeImport(firstDefinition) &&
isImportDeclaration(firstDefinition.parent) &&
isStringLiteral(firstDefinition.parent.source) &&
isExternalModuleDeclarationWithName(
scope,
firstDefinition.parent.source.value,
Expand Down

0 comments on commit 2b00d98

Please sign in to comment.