Skip to content

Latest commit

 

History

History
57 lines (40 loc) · 1.69 KB

no-restricted-syntax.md

File metadata and controls

57 lines (40 loc) · 1.69 KB
pageClass sidebarDepth title description
rule-details
0
vue/no-restricted-syntax
disallow specified syntax

vue/no-restricted-syntax

disallow specified syntax

This rule is the same rule as core no-restricted-syntax rule but it applies to the expressions in <template>.

🔧 Options

Please see no-restricted-syntax for detailed options.

You can include the AST created by vue-eslint-parser in the selector. To know more about certain nodes in produced AST, please go vue-eslint-parser - AST docs.

"VElement > VExpressionContainer CallExpression"

Forbids call expressions inside mustache interpolation.

<template>
  <!-- ✓ GOOD -->
  <div> {{ foo }} </div>
  <div> {{ foo.bar }} </div>

  <!-- ✗ BAD -->
  <div> {{ foo() }} </div>
  <div> {{ foo.bar() }} </div>
  <div> {{ foo().bar }} </div>
</template>

📚 Further reading

🔍 Implementation

Taken with ❤️ from ESLint core