import{_ as r,c as n,a7 as t,G as l,w as o,B as h,o as d,j as e,a as s}from"./chunks/framework.DD2aJwSX.js";const m=JSON.parse('{"title":"vue/no-restricted-syntax","description":"Disallow specified syntax in `<template>`","frontmatter":{"pageClass":"rule-details","sidebarDepth":0,"title":"vue/no-restricted-syntax","description":"Disallow specified syntax in `<template>`","since":"v5.2.0"},"headers":[],"relativePath":"rules/no-restricted-syntax.md","filePath":"rules/no-restricted-syntax.md","lastUpdated":1708303888000}'),p={name:"rules/no-restricted-syntax.md"};function k(c,i,E,u,g,y){const a=h("eslint-code-block");return d(),n("div",null,[i[1]||(i[1]=t('<h1 id="vue-no-restricted-syntax" tabindex="-1">vue/no-restricted-syntax <a class="header-anchor" href="#vue-no-restricted-syntax" aria-label="Permalink to &quot;vue/no-restricted-syntax&quot;">​</a></h1><blockquote><p>Disallow specified syntax in <code>&lt;template&gt;</code></p></blockquote><p>This rule is the same rule as core <a href="https://eslint.org/docs/rules/no-restricted-syntax" target="_blank" rel="noreferrer">no-restricted-syntax</a> rule but it applies to the expressions in <code>&lt;template&gt;</code>.</p><h2 id="options" tabindex="-1">🔧 Options <a class="header-anchor" href="#options" aria-label="Permalink to &quot;:wrench: Options&quot;">​</a></h2><p>Please see <a href="https://eslint.org/docs/rules/no-restricted-syntax" target="_blank" rel="noreferrer">no-restricted-syntax</a> for detailed options.</p><p>You can include the AST created by <a href="https://github.com/vuejs/vue-eslint-parser" target="_blank" rel="noreferrer">vue-eslint-parser</a> in the selector. To know more about certain nodes in produced AST, please go <a href="https://github.com/vuejs/vue-eslint-parser/blob/master/docs/ast.md" target="_blank" rel="noreferrer">vue-eslint-parser - AST docs</a>.</p><h3 id="velement-vexpressioncontainer-callexpression" tabindex="-1"><code>&quot;VElement &gt; VExpressionContainer CallExpression&quot;</code> <a class="header-anchor" href="#velement-vexpressioncontainer-callexpression" aria-label="Permalink to &quot;`&quot;VElement &gt; VExpressionContainer CallExpression&quot;`&quot;">​</a></h3><p>Forbids call expressions inside mustache interpolation.</p>',8)),l(a,{rules:{"vue/no-restricted-syntax":["error","VElement > VExpressionContainer CallExpression"]}},{default:o(()=>i[0]||(i[0]=[e("div",{class:"language-vue vp-adaptive-theme"},[e("button",{title:"Copy Code",class:"copy"}),e("span",{class:"lang"},"vue"),e("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},[e("code",null,[e("span",{class:"line"},[e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"<"),e("span",{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"}},"template"),e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},">")]),s(`
`),e("span",{class:"line"},[e("span",{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"}},"  <!-- ✓ GOOD -->")]),s(`
`),e("span",{class:"line"},[e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"  <"),e("span",{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"}},"div"),e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"> {{ foo }} </"),e("span",{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"}},"div"),e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},">")]),s(`
`),e("span",{class:"line"},[e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"  <"),e("span",{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"}},"div"),e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"> {{ foo.bar }} </"),e("span",{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"}},"div"),e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},">")]),s(`
`),e("span",{class:"line"}),s(`
`),e("span",{class:"line"},[e("span",{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"}},"  <!-- ✗ BAD -->")]),s(`
`),e("span",{class:"line"},[e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"  <"),e("span",{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"}},"div"),e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"> {{ foo() }} </"),e("span",{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"}},"div"),e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},">")]),s(`
`),e("span",{class:"line"},[e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"  <"),e("span",{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"}},"div"),e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"> {{ foo.bar() }} </"),e("span",{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"}},"div"),e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},">")]),s(`
`),e("span",{class:"line"},[e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"  <"),e("span",{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"}},"div"),e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"> {{ foo().bar }} </"),e("span",{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"}},"div"),e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},">")]),s(`
`),e("span",{class:"line"},[e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"</"),e("span",{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"}},"template"),e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},">")])])])],-1)])),_:1}),i[2]||(i[2]=t('<h2 id="further-reading" tabindex="-1">📚 Further Reading <a class="header-anchor" href="#further-reading" aria-label="Permalink to &quot;:books: Further Reading&quot;">​</a></h2><ul><li><a href="https://eslint.org/docs/rules/no-restricted-syntax" target="_blank" rel="noreferrer">no-restricted-syntax</a></li><li><a href="https://github.com/estree/estree" target="_blank" rel="noreferrer">ESTree</a></li><li><a href="https://github.com/vuejs/vue-eslint-parser" target="_blank" rel="noreferrer">vue-eslint-parser</a></li></ul><h2 id="version" tabindex="-1">🚀 Version <a class="header-anchor" href="#version" aria-label="Permalink to &quot;:rocket: Version&quot;">​</a></h2><p>This rule was introduced in eslint-plugin-vue v5.2.0</p><h2 id="implementation" tabindex="-1">🔍 Implementation <a class="header-anchor" href="#implementation" aria-label="Permalink to &quot;:mag: Implementation&quot;">​</a></h2><ul><li><a href="https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/no-restricted-syntax.js" target="_blank" rel="noreferrer">Rule source</a></li><li><a href="https://github.com/vuejs/eslint-plugin-vue/blob/master/tests/lib/rules/no-restricted-syntax.js" target="_blank" rel="noreferrer">Test source</a></li></ul><p><sup>Taken with ❤️ <a href="https://eslint.org/docs/latest/rules/no-restricted-syntax" target="_blank" rel="noreferrer">from ESLint core</a></sup></p>',7))])}const v=r(p,[["render",k]]);export{m as __pageData,v as default};
