no-over-abstraction
ProBoilerplate BloatDisallow pass-through wrapper functions that add no transformation
no-over-abstraction
Disallow pass-through wrapper functions that add no transformation
Category: Boilerplate Bloat | Tier: Pro
Why This Matters
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.
Bad Code
// Unnecessary wrapper that adds no value
class UserServiceFactory {
static createUserService() {
return new UserService(new UserRepository());
}
}
Good Code
// Direct instantiation when no abstraction is needed
const userService = new UserService(new UserRepository());
Configuration
This rule has no configuration options. It is enabled by default in lintmyai:recommended.