eslint/max-lines Pedantic β
What it does β
Enforce a maximum number of lines per file.
Why is this bad? β
Some people consider large files a code smell. Large files tend to do a lot of things and can make it hard following whatβs going. While there is not an objective maximum number of lines considered acceptable in a file, most people would agree it should not be in the thousands. Recommendations usually range from 100 to 500 lines.
How to use β
To enable this rule in the CLI or using the config file, you can use:
bash
oxlint --deny max-lines
json
{
"rules": {
"max-lines": "error"
}
}