Skip to content

Commit

Permalink
docs(website): fix node to originalNode in type checking example (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
GalenWong committed Dec 3, 2021
1 parent 833f822 commit 6e159ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/development/CUSTOM_RULES.md
Expand Up @@ -240,7 +240,7 @@ export const rule: eslint.Rule.RuleModule = {
const originalNode = parserServices.esTreeNodeToTSNodeMap.get(
node.right,
);
const nodeType = checker.getTypeAtLocation(node);
const nodeType = checker.getTypeAtLocation(originalNode);

// 3. Check the TS node type using the TypeScript APIs
if (tsutils.isTypeFlagSet(nodeType, ts.TypeFlags.EnumLike)) {
Expand Down

0 comments on commit 6e159ee

Please sign in to comment.