This repository was archived by the owner on Mar 7, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +62
-0
lines changed Expand file tree Collapse file tree 3 files changed +62
-0
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ module.exports = defineConfig({
125
125
'webextensions' ,
126
126
'webworker' ,
127
127
'wellknown' ,
128
+ 'whitespace' ,
128
129
'writeable'
129
130
]
130
131
}
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import type { GroupedAccessorPairsRule } from './grouped-accessor-pairs';
4
4
import type { LinebreakStyleRule } from './linebreak-style' ;
5
5
import type { MaxClassesPerFileRule } from './max-classes-per-file' ;
6
6
import type { MaxLenRule } from './max-len' ;
7
+ import type { MaxLinesRule } from './max-lines' ;
7
8
import type { NoCaseDeclarationsRule } from './no-case-declarations' ;
8
9
import type { NoConstantConditionRule } from './no-constant-condition' ;
9
10
import type { NoDebuggerRule } from './no-debugger' ;
@@ -23,6 +24,7 @@ export type EslintRules = CommaDangleRule &
23
24
LinebreakStyleRule &
24
25
MaxClassesPerFileRule &
25
26
MaxLenRule &
27
+ MaxLinesRule &
26
28
NoCaseDeclarationsRule &
27
29
NoConstantConditionRule &
28
30
NoDebuggerRule &
Original file line number Diff line number Diff line change
1
+ import type { RuleConfig } from '../rule-config' ;
2
+
3
+ /**
4
+ * Option.
5
+ */
6
+ export type MaxLinesOption =
7
+ | number
8
+ | {
9
+ /**
10
+ * Enforces a maximum number of lines in a file.
11
+ *
12
+ * @default 300
13
+ *
14
+ * @see [max](https://eslint.org/docs/rules/max-lines#code)
15
+ */
16
+ max ?: number ;
17
+ /**
18
+ * Ignore lines made up purely of whitespace.
19
+ *
20
+ * @default true
21
+ *
22
+ * @see [skipBlankLines](https://eslint.org/docs/rules/max-lines#skipblanklines)
23
+ */
24
+ skipBlankLines ?: boolean ;
25
+ /**
26
+ * Ignore lines containing just comments.
27
+ *
28
+ * @default true
29
+ *
30
+ * @see [skipComments](https://eslint.org/docs/rules/max-lines#skipcomments)
31
+ */
32
+ skipComments ?: boolean ;
33
+ } ;
34
+
35
+ /**
36
+ * Options.
37
+ */
38
+ export type MaxLinesOptions = [ MaxLinesOption ?] ;
39
+
40
+ /**
41
+ * Enforce a maximum file length.
42
+ *
43
+ * @see [max-lines](https://eslint.org/docs/rules/max-lines)
44
+ */
45
+ export type MaxLinesRuleConfig = RuleConfig < MaxLinesOptions > ;
46
+
47
+ /**
48
+ * Enforce a maximum file length.
49
+ *
50
+ * @see [max-lines](https://eslint.org/docs/rules/max-lines)
51
+ */
52
+ export interface MaxLinesRule {
53
+ /**
54
+ * Enforce a maximum file length.
55
+ *
56
+ * @see [max-lines](https://eslint.org/docs/rules/max-lines)
57
+ */
58
+ 'max-lines' : MaxLinesRuleConfig ;
59
+ }
You can’t perform that action at this time.
0 commit comments