eslint-plugin-mpx 0.2.24 → 0.2.25
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.
|
@@ -242,11 +242,18 @@ module.exports = {
|
|
|
242
242
|
CallExpression(node) {
|
|
243
243
|
if (utils.isScriptSetup(context)) {
|
|
244
244
|
// setup 直接收集 defineExpose 的值
|
|
245
|
-
if (
|
|
245
|
+
if (
|
|
246
|
+
node.callee.name === 'defineExpose' &&
|
|
247
|
+
node.arguments.length > 0
|
|
248
|
+
) {
|
|
246
249
|
commonFunction(node.arguments[0], computedSet)
|
|
247
250
|
}
|
|
248
251
|
} else {
|
|
249
|
-
if (
|
|
252
|
+
if (
|
|
253
|
+
node.callee.name !== 'createComponent' ||
|
|
254
|
+
node.arguments.length === 0
|
|
255
|
+
)
|
|
256
|
+
return
|
|
250
257
|
const properties = node.arguments[0].properties
|
|
251
258
|
if (!properties) return
|
|
252
259
|
for (const element of properties) {
|