eslint-plugin-vue icon indicating copy to clipboard operation
eslint-plugin-vue copied to clipboard

`vue/no-mutating-props` does not report `delete` operations

Open CyanSalt opened this issue 3 years ago • 0 comments

Checklist

  • [x] I have tried restarting my IDE and the issue persists.
  • [x] I have read the FAQ and my problem is not listed.

Tell us about your environment

  • ESLint version: 8.16.0
  • eslint-plugin-vue version: 9.0.1

What did you do?

See the demo here.

image

What did you expect to happen?

vue/no-mutating-props should report the delete operation on properties of prop objects, but currently it doesn't.

I noticed that the implementation of findMutating does not check for UnaryExpression. Since deleting properties is also reactive in 3.x, this kind of code will probably come up more often.

CyanSalt avatar May 23 '22 08:05 CyanSalt