[{"data":1,"prerenderedAt":347,"buildId":348},["ShallowReactive",2],{"docs:\u002Fintegrations\u002Fnuxt":3},{"page":4,"section":17,"document":18,"credits":11,"prev":340,"next":343},{"id":5,"path":6,"file":7,"title":8,"sourceTitle":9,"description":10,"tagline":10,"eyebrow":11,"credits":11,"keywords":12,"icon":13,"layout":14,"sidebar":15,"toc":15,"kind":11,"group":11,"navigation":15,"order":16},"nuxt","\u002Fintegrations\u002Fnuxt","integrations\u002Fnuxt.md","Nuxt","Nuxt and vue-i18n","Lint product terms in Nuxt apps and vue-i18n locale files through the Nuxt ESLint module.",null,[],"i-simple-icons-nuxt","article",true,2.5,"integrations",{"nodes":19,"toc":335},[20,46,54,68,215,250,255,267,305,311],[21,22,23,24,28,29,32,33,40,41,45],"p",{},"There is no Nuxt module. glosslint runs in the ESLint config ",[25,26,27],"code",{},"@nuxt\u002Feslint"," gives you, as one spread in ",[25,30,31],{},"eslint.config.mjs",". It reads ",[34,35,37],"a",{"href":36},"\u002Fguide\u002Fglossary",[25,38,39],{},".agents\u002Fglossary.md"," by default and takes the same options as the ",[34,42,44],{"href":43},"\u002Fintegrations\u002Feslint","ESLint integration",".",[47,48,53],"h2",{"id":49,"anchor":50},"setup",{"label":51,"icon":52},"Section titled \"Setup\"","#","Setup",[21,55,56,59,60,63,64,67],{},[25,57,58],{},"withNuxt"," has no JSON or YAML parser. Install ",[25,61,62],{},"jsonc-eslint-parser",", give it your locale files, and spread ",[25,65,66],{},"glosslint()"," after it:",[69,70,73],"pre",{"language":71,"filename":31,"class":72,"wrap":15},"js","shiki shiki-themes github-light-default github-dark-default dark:github-dark-default",[25,74,76,99,100,99,121,99,135,99,137,99,153,99,176,99,208],{"class":75},"language-js",[77,78,81,85,89,92,96],"span",{"class":79,"style":80},"line","display: inline",[77,82,84],{"style":83},"color:#CF222E;--shiki-dark:#FF7B72","import",[77,86,88],{"style":87},"color:#1F2328;--shiki-dark:#E6EDF3"," glosslint ",[77,90,91],{"style":83},"from",[77,93,95],{"style":94},"color:#0A3069;--shiki-dark:#A5D6FF"," \"glosslint\u002Feslint\"",[77,97,98],{"style":87},";","\n",[77,101,102,104,108,111,114,116,119],{"class":79,"style":80},[77,103,84],{"style":83},[77,105,107],{"style":106},"color:#0550AE;--shiki-dark:#79C0FF"," *",[77,109,110],{"style":83}," as",[77,112,113],{"style":87}," jsoncParser ",[77,115,91],{"style":83},[77,117,118],{"style":94}," \"jsonc-eslint-parser\"",[77,120,98],{"style":87},[77,122,123,125,128,130,133],{"class":79,"style":80},[77,124,84],{"style":83},[77,126,127],{"style":87}," withNuxt ",[77,129,91],{"style":83},[77,131,132],{"style":94}," \".\u002F.nuxt\u002Feslint.config.mjs\"",[77,134,98],{"style":87},[77,136],{"class":79,"style":80},[77,138,139,142,145,149],{"class":79,"style":80},[77,140,141],{"style":83},"export",[77,143,144],{"style":83}," default",[77,146,148],{"style":147},"color:#8250DF;--shiki-dark:#D2A8FF"," withNuxt",[77,150,152],{"style":151},"color:#953800;--shiki-dark:#FFA657","(",[77,154,155,158,161,164,167,170,173],{"class":79,"style":80},[77,156,157],{"style":151},"  { ",[77,159,160],{"style":87},"files: [",[77,162,163],{"style":94},"\"i18n\u002Flocales\u002F*.json\"",[77,165,166],{"style":87},"]",[77,168,169],{"style":151},", ",[77,171,172],{"style":87},"languageOptions: { parser: jsoncParser } ",[77,174,175],{"style":151},"},",[77,177,178,181,184,187,189,192,194,197,199,202,205],{"class":79,"style":80},[77,179,180],{"style":83},"  ...",[77,182,183],{"style":147},"glosslint",[77,185,186],{"style":151},"({ ",[77,188,160],{"style":87},[77,190,191],{"style":94},"\"app\u002F**\u002F*.{ts,vue}\"",[77,193,169],{"style":87},[77,195,196],{"style":94},"\"shared\u002F**\u002F*.ts\"",[77,198,169],{"style":87},[77,200,201],{"style":94},"\"i18n\u002Flocales\u002Fen.json\"",[77,203,204],{"style":87},"] ",[77,206,207],{"style":151},"}),",[77,209,210,213],{"class":79,"style":80},[77,211,212],{"style":151},")",[77,214,98],{"style":87},[21,216,217,218,221,222,225,226,229,230,233,234,237,238,241,242,245,246,45],{},"Use ",[25,219,220],{},"yaml-eslint-parser"," for ",[25,223,224],{},".yml"," locales. Drop the parser object if your config already lints JSON or YAML, such as ",[25,227,228],{},"withNuxt(antfu(...))",". Scope ",[25,231,232],{},"files"," to the source locale only, the language your glossary uses. ",[25,235,236],{},"@nuxtjs\u002Fi18n"," v10 keeps locales in ",[25,239,240],{},"i18n\u002Flocales\u002F"," unless ",[25,243,244],{},"langDir"," sets another folder. For other locales, use the ",[34,247,249],{"href":248},"\u002Fintegrations\u002Fx18n","x18n integration",[47,251,252],{"id":252,"anchor":253},"vue-i18n",{"label":254,"icon":52},"Section titled \"vue-i18n\"",[21,256,257,258,262,263,266],{},"glosslint reads locale string values, never keys, and uses the key above each value to set its text kind. See ",[34,259,261],{"href":260},"\u002Fguide\u002Fcasing","Casing rules",". You can run it alongside ",[25,264,265],{},"@intlify\u002Feslint-plugin-vue-i18n"," in the same config, since they do different jobs.",[21,268,269,270,273,274,169,277,169,280,283,284,287,288,291,292,295,296,299,300,304],{},"In code, glosslint skips vue-i18n keys: ",[25,271,272],{},"\u003Ci18n-t keypath>",", dotted key strings, and the first argument of ",[25,275,276],{},"t",[25,278,279],{},"$t",[25,281,282],{},"te",", and ",[25,285,286],{},"tm",". Inside messages, it skips placeholders like ",[25,289,290],{},"{count}",", linked messages like ",[25,293,294],{},"@:common.save",", and plural ",[25,297,298],{},"|"," pipes. See ",[34,301,303],{"href":302},"\u002Fguide\u002Fignored-text","What glosslint skips"," for the full list.",[47,306,310],{"id":307,"anchor":308},"limits",{"label":309,"icon":52},"Section titled \"Limits\"","Limits",[312,313,314,325],"ul",{},[315,316,317,320,321,324],"li",{},[25,318,319],{},"\u003Ci18n>"," custom blocks in ",[25,322,323],{},".vue"," files are not read.",[315,326,327,328,331,332,334],{},"Files parsed by ",[25,329,330],{},"@eslint\u002Fjson"," are not read. Use ",[25,333,62],{}," instead.",[336,338,339],{"id":49,"depth":337,"text":53},2,{"id":252,"depth":337,"text":252},{"id":307,"depth":337,"text":310},{"path":43,"title":341,"description":342},"ESLint","Lint JavaScript, TypeScript, Vue templates, YAML and JSON locales, comments, and identifiers against your glossary with ESLint flat config.",{"path":344,"title":345,"description":346},"\u002Fintegrations\u002Foxlint","Oxlint","Run glosslint's four rules as an Oxlint JS plugin on JavaScript, TypeScript, and Vue script blocks, using your glossary file.",1795769376371,"ebb2a05d-f63d-473e-9d47-1831648e3a0a"]