This repository was archived by the owner on Mar 7, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ 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
7
import type { NoCaseDeclarationsRule } from './no-case-declarations' ;
8
+ import type { NoConstantConditionRule } from './no-constant-condition' ;
8
9
import type { NoDebuggerRule } from './no-debugger' ;
9
10
import type { QuotesRule } from './quotes' ;
10
11
import type { SemiRule } from './semi' ;
@@ -19,6 +20,7 @@ export type EslintRules = CommaDangleRule &
19
20
MaxClassesPerFileRule &
20
21
MaxLenRule &
21
22
NoCaseDeclarationsRule &
23
+ NoConstantConditionRule &
22
24
NoDebuggerRule &
23
25
QuotesRule &
24
26
SemiRule ;
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 NoConstantConditionOption = {
7
+ /**
8
+ * Setting this option to `false` allows constant expressions in loops.
9
+ *
10
+ * @default true
11
+ *
12
+ * @see [checkLoops](https://eslint.org/docs/rules/no-constant-condition#checkloops)
13
+ */
14
+ checkLoops ?: boolean ;
15
+ } ;
16
+
17
+ /**
18
+ * Options.
19
+ */
20
+ export type NoConstantConditionOptions = [ NoConstantConditionOption ?] ;
21
+
22
+ /**
23
+ * Disallow constant expressions in conditions.
24
+ *
25
+ * @see [no-constant-condition](https://eslint.org/docs/rules/no-constant-condition)
26
+ */
27
+ export type NoConstantConditionRuleConfig = RuleConfig < NoConstantConditionOptions > ;
28
+
29
+ /**
30
+ * Disallow constant expressions in conditions.
31
+ *
32
+ * @see [no-constant-condition](https://eslint.org/docs/rules/no-constant-condition)
33
+ */
34
+ export interface NoConstantConditionRule {
35
+ /**
36
+ * Disallow constant expressions in conditions.
37
+ *
38
+ * @see [no-constant-condition](https://eslint.org/docs/rules/no-constant-condition)
39
+ */
40
+ 'no-constant-condition' : NoConstantConditionRuleConfig ;
41
+ }
You can’t perform that action at this time.
0 commit comments