Skip to content

Commit e9d683e

Browse files
committed
sync: is-native-element to canonical (PR #50) for byte-identical merges
1 parent e3e6a02 commit e9d683e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lib/utils/is-native-element.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ function isNativeElement(node, sourceCode) {
6060
}
6161
const scope = sourceCode.getScope(node.parent);
6262
const firstPart = node.parts && node.parts[0];
63-
if (firstPart && scope.references.some((ref) => ref.identifier === firstPart)) {
63+
// Compare by identifier name rather than AST node object identity — object
64+
// identity isn't guaranteed across parser versions (ember-eslint-parser can
65+
// produce distinct node objects for the same token depending on how the
66+
// scope manager walks the tree), but the resolved `.name` is stable.
67+
if (firstPart && scope.references.some((ref) => ref.identifier?.name === firstPart?.name)) {
6468
return false;
6569
}
6670
return true;

0 commit comments

Comments
 (0)