[{"data":1,"prerenderedAt":316},["ShallowReactive",2],{"navigation_docs":3,"diagnostic-content-PINIA0002":48},[4,8,12,16,20,24,28,32,36,40,44],{"title":5,"path":6,"stem":7},"CLI","\u002Fcli","1.cli",{"title":9,"path":10,"stem":11},"Nuxt","\u002Fnuxt","2.nuxt",{"title":13,"path":14,"stem":15},"Vue","\u002Fvue","3.vue",{"title":17,"path":18,"stem":19},"Vite","\u002Fvite","4.vite",{"title":21,"path":22,"stem":23},"Nitro","\u002Fnitro","5.nitro",{"title":25,"path":26,"stem":27},"TypeScript","\u002Ftypescript","6.typescript",{"title":29,"path":30,"stem":31},"shadcn","\u002Fshadcn","7.shadcn",{"title":33,"path":34,"stem":35},"Package","\u002Fpackage","8.package",{"title":37,"path":38,"stem":39},"Extending Doctor","\u002Fextending","9.extending",{"title":41,"path":42,"stem":43},"MCP","\u002Fmcp","9.mcp",{"title":45,"path":46,"stem":47},"Pinia","\u002Fpinia","9.pinia",{"id":49,"title":50,"body":51,"category":57,"code":304,"description":305,"docsUrl":58,"extension":306,"fix":307,"framework":308,"meta":309,"navigation":310,"pack":60,"path":311,"ruleId":61,"rulePath":62,"seo":312,"severity":63,"source":64,"sourceUrl":65,"stem":313,"why":314,"__hash__":315},"diagnostics\u002Fdiagnostics\u002FPINIA0002.md","PINIA0002: Name store composables after their id",{"type":52,"value":53,"toc":294},"minimark",[54,66,71,80,84,91,95,100,103,177,180,224,228,231,262,266,278,282,290],[55,56],"rule-metadata",{"category":57,"docsUrl":58,"fix":59,"pack":60,"ruleId":61,"rulePath":62,"severity":63,"source":64,"sourceUrl":65},"stores","https:\u002F\u002Fpinia.vuejs.org\u002Fcore-concepts\u002F#Defining-a-Store","no","vite-doctor\u002Fpinia","pinia\u002Fstores\u002Fstore-name-matches-id","\u002Fpinia\u002Frules\u002Fstores\u002Fstore-name-matches-id","info","src\u002Frule-packs\u002Fpinia\u002Frules\u002Fstore-name-matches-id.ts","https:\u002F\u002Fgithub.com\u002Fonmax\u002Fvite-doctor\u002Fblob\u002Fmain\u002Fsrc\u002Frule-packs\u002Fpinia\u002Frules\u002Fstore-name-matches-id.ts",[67,68,70],"h2",{"id":69},"why-it-happens","Why it happens",[72,73,74,75,79],"p",{},"Pinia's convention is to name the ",[76,77,78],"code",{},"defineStore()"," return value use followed by the store id and Store. When the composable name and the id drift apart, Devtools, SSR state keys, and HMR show an id that nobody can find by searching for the composable, and two stores can end up sharing an id unnoticed.",[67,81,83],{"id":82},"fix","Fix",[72,85,86,87,90],{},"Rename the composable to use",[76,88,89],{},"\u003CId>","Store, or change the id so it describes the store the composable returns. Kebab-case, snake_case, and camelCase ids map to the same PascalCase name, so 'shopping-cart' and 'shoppingCart' both expect useShoppingCartStore.",[67,92,94],{"id":93},"example","Example",[96,97,99],"h3",{"id":98},"match-the-composable-name-to-the-store-id","Match the composable name to the store id",[72,101,102],{},"Before",[104,105,110],"pre",{"className":106,"code":107,"language":108,"meta":109,"style":109},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","export const useBasket = defineStore('cart', () => {\n  \u002F* ... *\u002F\n})\n","ts","",[76,111,112,161,168],{"__ignoreMap":109},[113,114,117,121,125,129,133,137,140,143,147,149,152,155,158],"span",{"class":115,"line":116},"line",1,[113,118,120],{"class":119},"s7zQu","export",[113,122,124],{"class":123},"spNyl"," const",[113,126,128],{"class":127},"sTEyZ"," useBasket ",[113,130,132],{"class":131},"sMK4o","=",[113,134,136],{"class":135},"s2Zo4"," defineStore",[113,138,139],{"class":127},"(",[113,141,142],{"class":131},"'",[113,144,146],{"class":145},"sfazB","cart",[113,148,142],{"class":131},[113,150,151],{"class":131},",",[113,153,154],{"class":131}," ()",[113,156,157],{"class":123}," =>",[113,159,160],{"class":131}," {\n",[113,162,164],{"class":115,"line":163},2,[113,165,167],{"class":166},"sHwdD","  \u002F* ... *\u002F\n",[113,169,171,174],{"class":115,"line":170},3,[113,172,173],{"class":131},"}",[113,175,176],{"class":127},")\n",[72,178,179],{},"After",[104,181,183],{"className":106,"code":182,"language":108,"meta":109,"style":109},"export const useCartStore = defineStore('cart', () => {\n  \u002F* ... *\u002F\n})\n",[76,184,185,214,218],{"__ignoreMap":109},[113,186,187,189,191,194,196,198,200,202,204,206,208,210,212],{"class":115,"line":116},[113,188,120],{"class":119},[113,190,124],{"class":123},[113,192,193],{"class":127}," useCartStore ",[113,195,132],{"class":131},[113,197,136],{"class":135},[113,199,139],{"class":127},[113,201,142],{"class":131},[113,203,146],{"class":145},[113,205,142],{"class":131},[113,207,151],{"class":131},[113,209,154],{"class":131},[113,211,157],{"class":123},[113,213,160],{"class":131},[113,215,216],{"class":115,"line":163},[113,217,167],{"class":166},[113,219,220,222],{"class":115,"line":170},[113,221,173],{"class":131},[113,223,176],{"class":127},[67,225,227],{"id":226},"verify-the-fix","Verify the fix",[72,229,230],{},"Run only this rule after editing so the report stays focused on the diagnostic you are closing:",[104,232,236],{"className":233,"code":234,"language":235,"meta":109,"style":109},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pnpm vite-doctor . --extends auto,pinia\u002Fstrict --rules pinia\u002Fstores\u002Fstore-name-matches-id\n","bash",[76,237,238],{"__ignoreMap":109},[113,239,240,244,247,250,253,256,259],{"class":115,"line":116},[113,241,243],{"class":242},"sBMFI","pnpm",[113,245,246],{"class":145}," vite-doctor",[113,248,249],{"class":145}," .",[113,251,252],{"class":145}," --extends",[113,254,255],{"class":145}," auto,pinia\u002Fstrict",[113,257,258],{"class":145}," --rules",[113,260,261],{"class":145}," pinia\u002Fstores\u002Fstore-name-matches-id\n",[67,263,265],{"id":264},"useful-links","Useful links",[267,268,269],"ul",{},[270,271,272],"li",{},[273,274,277],"a",{"href":58,"rel":275},[276],"nofollow","Upstream docs",[67,279,281],{"id":280},"related-rule","Related rule",[267,283,284],{},[270,285,286],{},[273,287,288],{"href":62},[76,289,61],{},[291,292,293],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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 .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":109,"searchDepth":163,"depth":163,"links":295},[296,297,298,301,302,303],{"id":69,"depth":163,"text":70},{"id":82,"depth":163,"text":83},{"id":93,"depth":163,"text":94,"children":299},[300],{"id":98,"depth":170,"text":99},{"id":226,"depth":163,"text":227},{"id":264,"depth":163,"text":265},{"id":280,"depth":163,"text":281},"PINIA0002","Name the variable that receives defineStore() use\u003CId>Store, matching the literal store id.","md","Rename the composable to use\u003CId>Store, or change the id so it describes the store the composable returns. Kebab-case, snake_case, and camelCase ids map to the same PascalCase name, so 'shopping-cart' and 'shoppingCart' both expect useShoppingCartStore.","pinia",{},true,"\u002Fdiagnostics\u002Fpinia0002",{"title":50,"description":305},"diagnostics\u002FPINIA0002","Pinia's convention is to name the defineStore() return value use followed by the store id and Store. When the composable name and the id drift apart, Devtools, SSR state keys, and HMR show an id that nobody can find by searching for the composable, and two stores can end up sharing an id unnoticed.","ofOro9HvjXSQ-yG7S_ZmcWQd94oe__mGwxbikRAtQUM",1795268828548]