no-excessive-comments
ProBoilerplate BloatDisallow functions where comment-to-code ratio exceeds a threshold
no-excessive-comments
Disallow functions where comment-to-code ratio exceeds a threshold
Category: Boilerplate Bloat | Tier: Pro
Why This Matters
AI loves to narrate every line of code. These comments restate what the code already says, adding visual noise without insight. They make files harder to scan and create maintenance burden when the code changes but comments do not.
Bad Code
// This function adds two numbers together
// It takes two parameters a and b
// It returns the sum of a and b
function add(a: number, b: number) {
// Add a and b
return a + b; // return the result
}
Good Code
/** Adds two numbers. */
function add(a: number, b: number) {
return a + b;
}
Configuration
This rule accepts configuration options:
[
{
"type": "object",
"properties": {
"threshold": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"additionalProperties": false
}
]
Enabled by default in lintmyai:recommended.