MCPcopy Index your code
hub / github.com/nodejs/node / MemberExpression

Function MemberExpression

tools/eslint-rules/prefer-primordials.js:182–200  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

180 }
181 },
182 MemberExpression(node) {
183 const obj = node.object.name;
184 const prop = node.property.name;
185 if (!prop || !isTarget(nameMap, obj) || isIgnored(nameMap, obj, prop)) {
186 return;
187 }
188
189 const variables =
190 context.sourceCode.scopeManager.getDeclaredVariables(node);
191 if (variables.length === 0) {
192 context.report({
193 node,
194 messageId: 'error',
195 data: {
196 name: toPrimordialsName(obj, prop),
197 },
198 });
199 }
200 },
201 VariableDeclarator(node) {
202 const name = node.init?.name;
203 if (name === 'primordials' && node.id.type === 'ObjectPattern') {

Callers

nothing calls this directly

Calls 4

isTargetFunction · 0.85
isIgnoredFunction · 0.85
toPrimordialsNameFunction · 0.85
reportMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…