[{"data":1,"prerenderedAt":518,"buildId":519},["ShallowReactive",2],{"diagnostic-content-VUE0051":3,"navigation_docs":417},{"id":4,"title":5,"body":6,"category":12,"code":408,"description":409,"docsUrl":13,"extension":410,"fix":411,"framework":71,"meta":412,"navigation":156,"pack":15,"path":413,"ruleId":16,"rulePath":17,"seo":414,"severity":18,"source":19,"sourceUrl":20,"stem":415,"why":29,"__hash__":416},"diagnostics\u002Fdiagnostics\u002FVUE0051.md","VUE0051: Give fallthrough attributes a root on multi-root components",{"type":7,"value":8,"toc":398},"minimark",[9,21,26,30,34,54,58,63,66,209,212,322,326,329,366,370,382,386,394],[10,11],"rule-metadata",{"category":12,"docsUrl":13,"fix":14,"pack":15,"ruleId":16,"rulePath":17,"severity":18,"source":19,"sourceUrl":20},"attrs","https:\u002F\u002Fvuejs.org\u002Fguide\u002Fcomponents\u002Fattrs.html#attribute-inheritance-on-multiple-root-nodes","no","vite-doctor\u002Fvue","vue\u002Fattrs\u002Fno-multi-root-fallthrough","\u002Fvue\u002Frules\u002Fattrs\u002Fno-multi-root-fallthrough","warn","src\u002Frule-packs\u002Fvue\u002Frules\u002Fvue\u002Fno-multi-root-fallthrough.ts","https:\u002F\u002Fgithub.com\u002Fwords-with-agents\u002Fvite-doctor\u002Fblob\u002Fmain\u002Fsrc\u002Frule-packs\u002Fvue\u002Frules\u002Fvue\u002Fno-multi-root-fallthrough.ts",[22,23,25],"h2",{"id":24},"why-it-happens","Why it happens",[27,28,29],"p",{},"Vue normally forwards undeclared attributes and listeners to a single root element or component. With several roots, Vue does not automatically attach them and warns in development. A component can still emit an undeclared event and invoke the caller's listener; missing DOM inheritance does not mean the listener is unused.",[22,31,33],{"id":32},"fix","Fix",[27,35,36,37,41,42,45,46,49,50,53],{},"Bind ",[38,39,40],"code",{},"$attrs"," on the intended root with ",[38,43,44],{},"v-bind=\"$attrs\""," or wrap the template in one root element. Declare inputs the component consumes as props. If the component emits the event, declare it in ",[38,47,48],{},"emits"," or ",[38,51,52],{},"defineEmits()"," and keep the caller’s listener.",[22,55,57],{"id":56},"example","Example",[59,60,62],"h3",{"id":61},"bind-attrs-on-the-root-that-should-receive-them","Bind $attrs on the root that should receive them",[27,64,65],{},"Before",[67,68,73],"pre",{"className":69,"code":70,"language":71,"meta":72,"style":72},"language-vue shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003C!-- PageLayout.vue -->\n\u003Ctemplate>\n  \u003Cheader>Title\u003C\u002Fheader>\n  \u003Cmain>\u003Cslot \u002F>\u003C\u002Fmain>\n\u003C\u002Ftemplate>\n\n\u003C!-- Page.vue -->\n\u003Ctemplate>\n  \u003CPageLayout class=\"page\" \u002F>\n\u003C\u002Ftemplate>\n","vue","",[38,74,75,84,98,121,142,151,158,164,173,200],{"__ignoreMap":72},[76,77,80],"span",{"class":78,"line":79},"line",1,[76,81,83],{"class":82},"sHwdD","\u003C!-- PageLayout.vue -->\n",[76,85,87,91,95],{"class":78,"line":86},2,[76,88,90],{"class":89},"sMK4o","\u003C",[76,92,94],{"class":93},"swJcz","template",[76,96,97],{"class":89},">\n",[76,99,101,104,107,110,114,117,119],{"class":78,"line":100},3,[76,102,103],{"class":89},"  \u003C",[76,105,106],{"class":93},"header",[76,108,109],{"class":89},">",[76,111,113],{"class":112},"sTEyZ","Title",[76,115,116],{"class":89},"\u003C\u002F",[76,118,106],{"class":93},[76,120,97],{"class":89},[76,122,124,126,129,132,135,138,140],{"class":78,"line":123},4,[76,125,103],{"class":89},[76,127,128],{"class":93},"main",[76,130,131],{"class":89},">\u003C",[76,133,134],{"class":93},"slot",[76,136,137],{"class":89}," \u002F>\u003C\u002F",[76,139,128],{"class":93},[76,141,97],{"class":89},[76,143,145,147,149],{"class":78,"line":144},5,[76,146,116],{"class":89},[76,148,94],{"class":93},[76,150,97],{"class":89},[76,152,154],{"class":78,"line":153},6,[76,155,157],{"emptyLinePlaceholder":156},true,"\n",[76,159,161],{"class":78,"line":160},7,[76,162,163],{"class":82},"\u003C!-- Page.vue -->\n",[76,165,167,169,171],{"class":78,"line":166},8,[76,168,90],{"class":89},[76,170,94],{"class":93},[76,172,97],{"class":89},[76,174,176,178,181,185,188,191,195,197],{"class":78,"line":175},9,[76,177,103],{"class":89},[76,179,180],{"class":93},"PageLayout",[76,182,184],{"class":183},"spNyl"," class",[76,186,187],{"class":89},"=",[76,189,190],{"class":89},"\"",[76,192,194],{"class":193},"sfazB","page",[76,196,190],{"class":89},[76,198,199],{"class":89}," \u002F>\n",[76,201,203,205,207],{"class":78,"line":202},10,[76,204,116],{"class":89},[76,206,94],{"class":93},[76,208,97],{"class":89},[27,210,211],{},"After",[67,213,215],{"className":69,"code":214,"language":71,"meta":72,"style":72},"\u003C!-- PageLayout.vue -->\n\u003Ctemplate>\n  \u003Cheader>Title\u003C\u002Fheader>\n  \u003Cmain v-bind=\"$attrs\">\u003Cslot \u002F>\u003C\u002Fmain>\n\u003C\u002Ftemplate>\n\n\u003C!-- Page.vue -->\n\u003Ctemplate>\n  \u003CPageLayout class=\"page\" \u002F>\n\u003C\u002Ftemplate>\n",[38,216,217,221,229,245,272,280,284,288,296,314],{"__ignoreMap":72},[76,218,219],{"class":78,"line":79},[76,220,83],{"class":82},[76,222,223,225,227],{"class":78,"line":86},[76,224,90],{"class":89},[76,226,94],{"class":93},[76,228,97],{"class":89},[76,230,231,233,235,237,239,241,243],{"class":78,"line":100},[76,232,103],{"class":89},[76,234,106],{"class":93},[76,236,109],{"class":89},[76,238,113],{"class":112},[76,240,116],{"class":89},[76,242,106],{"class":93},[76,244,97],{"class":89},[76,246,247,249,251,254,256,258,260,262,264,266,268,270],{"class":78,"line":123},[76,248,103],{"class":89},[76,250,128],{"class":93},[76,252,253],{"class":183}," v-bind",[76,255,187],{"class":89},[76,257,190],{"class":89},[76,259,40],{"class":193},[76,261,190],{"class":89},[76,263,131],{"class":89},[76,265,134],{"class":93},[76,267,137],{"class":89},[76,269,128],{"class":93},[76,271,97],{"class":89},[76,273,274,276,278],{"class":78,"line":144},[76,275,116],{"class":89},[76,277,94],{"class":93},[76,279,97],{"class":89},[76,281,282],{"class":78,"line":153},[76,283,157],{"emptyLinePlaceholder":156},[76,285,286],{"class":78,"line":160},[76,287,163],{"class":82},[76,289,290,292,294],{"class":78,"line":166},[76,291,90],{"class":89},[76,293,94],{"class":93},[76,295,97],{"class":89},[76,297,298,300,302,304,306,308,310,312],{"class":78,"line":175},[76,299,103],{"class":89},[76,301,180],{"class":93},[76,303,184],{"class":183},[76,305,187],{"class":89},[76,307,190],{"class":89},[76,309,194],{"class":193},[76,311,190],{"class":89},[76,313,199],{"class":89},[76,315,316,318,320],{"class":78,"line":202},[76,317,116],{"class":89},[76,319,94],{"class":93},[76,321,97],{"class":89},[22,323,325],{"id":324},"verify-the-fix","Verify the fix",[27,327,328],{},"Run only this rule after editing so the report stays focused on the diagnostic you are closing:",[67,330,334],{"className":331,"code":332,"language":333,"meta":72,"style":72},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pnpm vite-doctor . --framework vue --extends auto,vue\u002Fstrict --rules vue\u002Fattrs\u002Fno-multi-root-fallthrough\n","bash",[38,335,336],{"__ignoreMap":72},[76,337,338,342,345,348,351,354,357,360,363],{"class":78,"line":79},[76,339,341],{"class":340},"sBMFI","pnpm",[76,343,344],{"class":193}," vite-doctor",[76,346,347],{"class":193}," .",[76,349,350],{"class":193}," --framework",[76,352,353],{"class":193}," vue",[76,355,356],{"class":193}," --extends",[76,358,359],{"class":193}," auto,vue\u002Fstrict",[76,361,362],{"class":193}," --rules",[76,364,365],{"class":193}," vue\u002Fattrs\u002Fno-multi-root-fallthrough\n",[22,367,369],{"id":368},"useful-links","Useful links",[371,372,373],"ul",{},[374,375,376],"li",{},[377,378,381],"a",{"href":13,"rel":379},[380],"nofollow","Upstream docs",[22,383,385],{"id":384},"related-rule","Related rule",[371,387,388],{},[374,389,390],{},[377,391,392],{"href":17},[38,393,16],{},[395,396,397],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"title":72,"searchDepth":86,"depth":86,"links":399},[400,401,402,405,406,407],{"id":24,"depth":86,"text":25},{"id":32,"depth":86,"text":33},{"id":56,"depth":86,"text":57,"children":403},[404],{"id":61,"depth":100,"text":62},{"id":324,"depth":86,"text":325},{"id":368,"depth":86,"text":369},{"id":384,"depth":86,"text":385},"VUE0051","Finds a component usage that passes attributes or listeners, such as `class`, `id` or `@click`, to a component whose template has more than one root node, when the component declares none of them as props, `defineModel()` props or emits, keeps `inheritAttrs` on, and never reads `$attrs`, `useAttrs()` or `getCurrentInstance()`. A `v-if`\u002F`v-else-if`\u002F`v-else` chain counts as one root and comments are not roots, as in Vue's compiler. Doctor reports at the usage, only for usages it resolved to the component, and skips spreads such as `v-bind=\"obj\"`, `key` and `ref`, and `update:*` model listeners. When Nuxt generates a lazy hydration wrapper, Doctor skips the strategy prop and `hydrated` listeners that the wrapper consumes. Components whose props it cannot read, such as `defineProps\u003CImportedProps>()` or an Options API `props` option, are skipped; listeners are skipped when the emits are unreadable. Strict Preset only.","md","Bind `$attrs` on the intended root with `v-bind=\"$attrs\"` or wrap the template in one root element. Declare inputs the component consumes as props. If the component emits the event, declare it in `emits` or `defineEmits()` and keep the caller’s listener.",{},"\u002Fdiagnostics\u002Fvue0051",{"title":5,"description":409},"diagnostics\u002FVUE0051","JHpTCsRa3SQqPaXXQms7kRKvgAuiMcMhvzh1AiE_smc",[418,446,450,454,458,462,466,478,482,506,510,514],{"title":419,"path":420,"stem":421,"children":422,"icon":445},"CLI","\u002Fcli","1.cli\u002F1.index",[423,425,429,433,437,441],{"title":424,"path":420,"stem":421},"Run Doctor",{"title":426,"path":427,"stem":428},"Reports","\u002Fcli\u002Freports","1.cli\u002F2.reports",{"title":430,"path":431,"stem":432},"Configuration","\u002Fcli\u002Fconfiguration","1.cli\u002F3.configuration",{"title":434,"path":435,"stem":436},"CI and changed files","\u002Fcli\u002Fci","1.cli\u002F4.ci",{"title":438,"path":439,"stem":440},"Workspaces","\u002Fcli\u002Fworkspaces","1.cli\u002F5.workspaces",{"title":442,"path":443,"stem":444},"Cache and speed","\u002Fcli\u002Fcache","1.cli\u002F6.cache","i-lucide-terminal",{"title":447,"path":448,"stem":449},"Nuxt","\u002Fnuxt","2.nuxt",{"title":451,"path":452,"stem":453},"Vue","\u002Fvue","3.vue",{"title":455,"path":456,"stem":457},"Vite","\u002Fvite","4.vite",{"title":459,"path":460,"stem":461},"Nitro","\u002Fnitro","5.nitro",{"title":463,"path":464,"stem":465},"TypeScript","\u002Ftypescript","6.typescript",{"title":467,"path":468,"stem":469,"children":470,"icon":477},"Design system","\u002Fdesign-system","7.design-system\u002F1.index",[471,473],{"title":472,"path":468,"stem":469},"Overview",{"title":474,"path":475,"stem":476},"Classes and styles","\u002Fdesign-system\u002Fclasses","7.design-system\u002F2.classes","i-lucide-swatch-book",{"title":479,"path":480,"stem":481},"Package","\u002Fpackage","8.package",{"title":483,"path":484,"stem":485,"children":486,"icon":505},"Extending Doctor","\u002Fextending","9.extending\u002F1.index",[487,489,493,497,501],{"title":488,"path":484,"stem":485},"Write an extension",{"title":490,"path":491,"stem":492},"Visitors","\u002Fextending\u002Fvisitors","9.extending\u002F2.visitors",{"title":494,"path":495,"stem":496},"Ship with a library","\u002Fextending\u002Fshipping","9.extending\u002F3.shipping",{"title":498,"path":499,"stem":500},"Test a Rule","\u002Fextending\u002Ftesting","9.extending\u002F4.testing",{"title":502,"path":503,"stem":504},"Rule inputs","\u002Fextending\u002Frule-inputs","9.extending\u002F5.rule-inputs","i-lucide-puzzle",{"title":507,"path":508,"stem":509},"H3","\u002Fh3","9.h3",{"title":511,"path":512,"stem":513},"MCP","\u002Fmodel-context-protocol","9.model-context-protocol",{"title":515,"path":516,"stem":517},"Pinia","\u002Fpinia","9.pinia",1796507778680,"e745db9b-2064-477e-b678-8c0a05edc39c"]