Skip to content

no-side-effects-in-computed-properties does not report errors for this.$set or this.$nextTick #1744

Closed
@simonbrent

Description

@simonbrent

Checklist

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

Tell us about your environment

  • ESLint version: 8.4.1
  • eslint-plugin-vue version: 8.2.0
  • Node version: 14.18.1
  • Operating System: Ubuntu 18.04

Please show your full configuration:

module.exports = {
  extends: [
    'plugin:vue/recommended',
  ],
}

What did you do?

<script>
  export default {
    data: () => ({ bar: 1 }),
    computed: {
      foo: function () {
        this.$set(this, 'bar', 1);
        this.$nextTick(() => this.$set(this, 'bar', 2));
        return 1;
      }
    }
  };
</script>

What did you expect to happen?
Unexpected side effect in "foo" computed property vue/no-side-effects-in-computed-properties for this.$set and this.$nextTick

What actually happened?

No reported errors

Repository to reproduce this issue

https://github.com/simonbrent/eslint-plugin-vue-bug

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions