@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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pyreon/lint",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.7",
|
|
4
4
|
"description": "Pyreon-specific linter — 56 rules for signals, JSX, SSR, performance, router, and architecture",
|
|
5
5
|
"homepage": "https://github.com/pyreon/pyreon/tree/main/packages/lint#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -80,6 +80,11 @@ function checkFunction(node: any, context: any, depth: number) {
|
|
|
80
80
|
// Skip HOC inner functions (depth > 1)
|
|
81
81
|
if (depth > 1) return
|
|
82
82
|
|
|
83
|
+
// Skip functions passed as arguments to HOC factories
|
|
84
|
+
// e.g. createLink(({ href, ...rest }) => <a {...rest} />)
|
|
85
|
+
const parent = node.parent
|
|
86
|
+
if (parent?.type === 'CallExpression' && parent.arguments?.includes(node)) return
|
|
87
|
+
|
|
83
88
|
const body = node.body
|
|
84
89
|
if (!body) return
|
|
85
90
|
|