max-lines
eslint
No autofix
eslint.config.js
export default [
{
rules: {
"max-lines": "error",
},
},
];let a,
b,
c;let a,
b,c;// a comment
let a,
b,c;let a,
b, c;let a, b, c;// a comment
let a, b, c;Examples from the ESLint documentation.
max-lines
eslint
export default [
{
rules: {
"max-lines": "error",
},
},
];max-lines
eslint plugin · pedantic
{
"rules": {
"max-lines": "error"
}
}style/noExcessiveLinesPerFile
style · since 2.3.12
{
"linter": {
"rules": {
"style": {
"noExcessiveLinesPerFile": "error"
}
}
}
}Enforce a maximum depth that blocks can be nested
Disallow use of this in contexts where the value of this is undefined
Enforce a maximum number of parameters in function definitions
Disallow shorthand type conversions
Enforce or disallow capitalization of the first letter of a comment