MCPcopy Create free account
hub / github.com/callstack/react-native-paper / create

Function create

eslint-local-rules/no-react-forwardref-usage.js:10–27  ·  view source on GitHub ↗
(context)

Source from the content-addressed store, hash-verified

8 schema: [],
9 },
10 create(context) {
11 return {
12 CallExpression(node) {
13 if (node.callee?.type !== 'MemberExpression') return;
14
15 const { callee } = node;
16 if (callee.object.type !== 'Identifier') return;
17 if (callee.object.name !== 'React') return;
18 if (callee.property.type !== 'Identifier') return;
19 if (callee.property.name !== 'forwardRef') return;
20
21 context.report({
22 loc: callee.loc,
23 message: 'Use forwardRef from src/utils/forwardRef instead',
24 });
25 },
26 };
27 },
28};

Callers 1

index.jsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…