@pyreon/lint 0.12.5 → 0.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/analysis/cli.js.html +1 -1
- package/lib/analysis/index.js.html +1 -1
- package/lib/cli.js +2 -0
- package/lib/cli.js.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/rules/jsx/no-props-destructure.ts +5 -0
package/lib/index.js
CHANGED
|
@@ -1181,6 +1181,8 @@ function checkFunction(node, context, depth) {
|
|
|
1181
1181
|
const firstParam = params[0];
|
|
1182
1182
|
if (!isDestructuring(firstParam)) return;
|
|
1183
1183
|
if (depth > 1) return;
|
|
1184
|
+
const parent = node.parent;
|
|
1185
|
+
if (parent?.type === "CallExpression" && parent.arguments?.includes(node)) return;
|
|
1184
1186
|
const body = node.body;
|
|
1185
1187
|
if (!body) return;
|
|
1186
1188
|
if (containsJSXReturn(body)) {
|