Vue option should not have typo

  • VUE_OPTION_TYPO
  • Error
  • Medium
  • vue

This rule applies when Vue options have typo.

Typos in the option names may prevent intended behaviors from occurring as follows:

  1. Vue lifecycle hooks having typo will not be called on the intended lifecycle.
  2. Other Vue options having typo can cause Vue warnings, and the instance may not be rendered as intended.

Noncompliant Code Example

View with compliant examples side by side
<script>
export default {
  beforeCreated() { // VUE_OPTION_TYPO alarm because 'beforeCreate' is a correct name of the lifecycle method.
    // do something
  }
}
</script>

Compliant Code Example

View with noncompliant examples side by side
<script>
export default {
  beforeCreate() {
    // do something
  }
}
</script>

Version

This rule was introduced in DeepScan 1.14.0-beta.

See

Was this documentation helpful?