MCPcopy
hub / github.com/ampproject/amphtml / MemberExpression

Function MemberExpression

build-system/eslint-rules/preact-preferred-props.js:118–131  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

116 },
117
118 MemberExpression(node) {
119 const property = node.property.name || node.property.value;
120
121 if (property?.toLowerCase?.() === 'tabindex') {
122 context.report({
123 node: node.property,
124 message:
125 '`tabindex` and `tabIndex` should be supported equally.' +
126 ' Instead of property access, use:' +
127 `\n\timport {tabindexFromProps} from '#preact/utils';` +
128 `\n\t<... tabindex={tabindexFromProps(rest)}>`,
129 });
130 }
131 },
132
133 [`CallExpression[callee.name="${propNameFn}"]`]: function (node) {
134 if (

Callers

nothing calls this directly

Calls 1

reportMethod · 0.45

Tested by

no test coverage detected