[{"data":1,"prerenderedAt":139},["ShallowReactive",2],{"rule-/rules/no-over-abstraction":3},{"id":4,"title":5,"body":6,"category":127,"description":15,"extension":128,"isWrapped":129,"meta":130,"navigation":131,"path":132,"ruleType":133,"seo":134,"stem":135,"tier":136,"upstreamUrl":137,"__hash__":138},"rules/rules/no-over-abstraction.md","no-over-abstraction",{"type":7,"value":8,"toc":121},"minimark",[9,12,16,27,32,35,39,87,91,106,110,117],[10,11,5],"h1",{"id":5},[13,14,15],"p",{},"Disallow pass-through wrapper functions that add no transformation",[13,17,18,22,23,26],{},[19,20,21],"strong",{},"Category:"," Boilerplate Bloat | ",[19,24,25],{},"Tier:"," Pro",[28,29,31],"h2",{"id":30},"why-this-matters","Why This Matters",[13,33,34],{},"AI tends to generate enterprise-style abstractions -- factories, wrappers, and manager classes -- for problems that need a simple function call. Each unnecessary layer adds indirection, making the codebase harder to navigate and debug.",[28,36,38],{"id":37},"bad-code","Bad Code",[40,41,46],"pre",{"className":42,"code":43,"language":44,"meta":45,"style":45},"language-javascript shiki shiki-themes github-light github-dark","// Unnecessary wrapper that adds no value\nclass UserServiceFactory {\n  static createUserService() {\n    return new UserService(new UserRepository());\n  }\n}\n","javascript","",[47,48,49,57,63,69,75,81],"code",{"__ignoreMap":45},[50,51,54],"span",{"class":52,"line":53},"line",1,[50,55,56],{},"// Unnecessary wrapper that adds no value\n",[50,58,60],{"class":52,"line":59},2,[50,61,62],{},"class UserServiceFactory {\n",[50,64,66],{"class":52,"line":65},3,[50,67,68],{},"  static createUserService() {\n",[50,70,72],{"class":52,"line":71},4,[50,73,74],{},"    return new UserService(new UserRepository());\n",[50,76,78],{"class":52,"line":77},5,[50,79,80],{},"  }\n",[50,82,84],{"class":52,"line":83},6,[50,85,86],{},"}\n",[28,88,90],{"id":89},"good-code","Good Code",[40,92,94],{"className":42,"code":93,"language":44,"meta":45,"style":45},"// Direct instantiation when no abstraction is needed\nconst userService = new UserService(new UserRepository());\n",[47,95,96,101],{"__ignoreMap":45},[50,97,98],{"class":52,"line":53},[50,99,100],{},"// Direct instantiation when no abstraction is needed\n",[50,102,103],{"class":52,"line":59},[50,104,105],{},"const userService = new UserService(new UserRepository());\n",[28,107,109],{"id":108},"configuration","Configuration",[13,111,112,113,116],{},"This rule has no configuration options. It is enabled by default in ",[47,114,115],{},"lintmyai:recommended",".",[118,119,120],"style",{},"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);}",{"title":45,"searchDepth":59,"depth":59,"links":122},[123,124,125,126],{"id":30,"depth":59,"text":31},{"id":37,"depth":59,"text":38},{"id":89,"depth":59,"text":90},{"id":108,"depth":59,"text":109},"Boilerplate Bloat","md",false,{},true,"/rules/no-over-abstraction","suggestion",{"title":5,"description":15},"rules/no-over-abstraction","pro",null,"eGl7e7lOpNFFUx1T2G5_M62y8Y1PT01t1w4GvXWNsew",1773394825594]