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

Function ArrayPattern

tools/eslint-rules/no-array-destructuring.js:62–80  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

60
61 return {
62 ArrayPattern(node) {
63 const hasRest = arrayPatternContainsRestOperator(node);
64 context.report({
65 message: hasRest ? USE_ARRAY_METHODS : USE_OBJ_DESTRUCTURING,
66 node: hasRest || node,
67 fix: hasRest ?
68 undefined :
69 (fixer) => [
70 ...(node.parent.type === 'AssignmentExpression' ?
71 [
72 fixer.insertTextBefore(node.parent, '('),
73 fixer.insertTextAfter(node.parent, ')'),
74 ] :
75 []),
76 ...createFix(fixer, sourceCode, node),
77 ],
78 });
79
80 },
81 };
82 },
83};

Callers

nothing calls this directly

Calls 3

createFixFunction · 0.85
reportMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…