max-lines
Configuration
rslint.config.ts
Enforce a maximum number of lines per file.
Rule Details
Large files tend to do a lot of things and can make it hard to follow what's going on. This rule caps the number of lines in a file.
With the { "max": 3 } option:
Examples of incorrect code for this rule:
Examples of correct code for this rule:
Options
This rule accepts a number (the maximum allowed) or an object with the following properties:
max(default300): the maximum number of lines allowed in a file.skipBlankLines(defaultfalse): ignore lines made up purely of whitespace.skipComments(defaultfalse): ignore lines containing just comments (a comment that shares a line with code does not exclude that line).
skipBlankLines
Examples of correct code with the above configuration:
skipComments
Examples of correct code with the above configuration: