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 (node.callee.name === 'defineExpose') {
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 (node.callee.name !== 'createComponent') return
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-mpx",
3
- "version": "0.2.24",
3
+ "version": "0.2.25",
4
4
  "description": "Official ESLint plugin for Mpx.js",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",