Skip to content

Rule Proposal: vue/no-unused-methods #848

Closed
@phaibin

Description

@phaibin

Please describe what the rule should do:

Unused methods should be warned and you can clear them out.

What category should the rule belong to?

  • Enforces code style
  • Warns about a potential error
  • Suggests an alternate way of doing something
  • Other (please specify:)

Provide 2-3 code examples that this rule should warn about:

<template>
  <h1>Hello</h1>
</template>
<script>
export default {
  data() {
    return {
    }
  },
  mounted() {
    this.init()
  },
  methods: {
    init() {

    },
    unusedMethod() {

    }    
  }
}
</script>

This unusedMethod method should be set as Warning and easily to find out.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions