Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit 67f8ff9

Browse files
author
Quadflieg , Christopher
committed
Update @typescript-eslint rules
1 parent f2ea4cf commit 67f8ff9

8 files changed

+202
-247
lines changed

src/rules/typescript-eslint/consistent-type-imports.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import type { RuleConfig } from '../rule-config';
66
export interface ConsistentTypeImportsOption {
77
prefer?: 'type-imports' | 'no-type-imports';
88
disallowTypeAnnotations?: boolean;
9+
fixStyle?: 'separate-type-imports' | 'inline-type-imports';
910
}
1011

1112
/**

src/rules/typescript-eslint/keyword-spacing.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,10 @@ export interface KeywordSpacingOption {
279279
before?: boolean;
280280
after?: boolean;
281281
};
282+
type?: {
283+
before?: boolean;
284+
after?: boolean;
285+
};
282286
};
283287
}
284288

src/rules/typescript-eslint/member-ordering.d.ts

Lines changed: 173 additions & 240 deletions
Large diffs are not rendered by default.

src/rules/typescript-eslint/naming-convention.d.ts

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ export type NamingConventionOption = (
8282
| 'exported'
8383
| 'unused'
8484
| 'requiresQuotes'
85+
| 'override'
86+
| 'async'
8587
)[];
8688
types?: ('boolean' | 'string' | 'number' | 'function' | 'array')[];
8789
}
@@ -139,6 +141,8 @@ export type NamingConventionOption = (
139141
| 'exported'
140142
| 'unused'
141143
| 'requiresQuotes'
144+
| 'override'
145+
| 'async'
142146
)[];
143147
}
144148
| {
@@ -182,7 +186,7 @@ export type NamingConventionOption = (
182186
[k: string]: any;
183187
};
184188
selector: 'variableLike';
185-
modifiers?: 'unused'[];
189+
modifiers?: ('unused' | 'async')[];
186190
}
187191
| {
188192
format:
@@ -231,6 +235,7 @@ export type NamingConventionOption = (
231235
| 'exported'
232236
| 'global'
233237
| 'unused'
238+
| 'async'
234239
)[];
235240
types?: ('boolean' | 'string' | 'number' | 'function' | 'array')[];
236241
}
@@ -275,7 +280,7 @@ export type NamingConventionOption = (
275280
[k: string]: any;
276281
};
277282
selector: 'function';
278-
modifiers?: ('exported' | 'global' | 'unused')[];
283+
modifiers?: ('exported' | 'global' | 'unused' | 'async')[];
279284
}
280285
| {
281286
format:
@@ -370,6 +375,8 @@ export type NamingConventionOption = (
370375
| 'readonly'
371376
| 'requiresQuotes'
372377
| 'static'
378+
| 'override'
379+
| 'async'
373380
)[];
374381
}
375382
| {
@@ -421,6 +428,7 @@ export type NamingConventionOption = (
421428
| 'readonly'
422429
| 'requiresQuotes'
423430
| 'static'
431+
| 'override'
424432
)[];
425433
types?: ('boolean' | 'string' | 'number' | 'function' | 'array')[];
426434
}
@@ -605,6 +613,8 @@ export type NamingConventionOption = (
605613
| 'readonly'
606614
| 'requiresQuotes'
607615
| 'static'
616+
| 'override'
617+
| 'async'
608618
)[];
609619
types?: ('boolean' | 'string' | 'number' | 'function' | 'array')[];
610620
}
@@ -656,6 +666,8 @@ export type NamingConventionOption = (
656666
| 'public'
657667
| 'requiresQuotes'
658668
| 'static'
669+
| 'override'
670+
| 'async'
659671
)[];
660672
}
661673
| {
@@ -699,7 +711,7 @@ export type NamingConventionOption = (
699711
[k: string]: any;
700712
};
701713
selector: 'objectLiteralMethod';
702-
modifiers?: ('public' | 'requiresQuotes')[];
714+
modifiers?: ('public' | 'requiresQuotes' | 'async')[];
703715
}
704716
| {
705717
format:
@@ -792,6 +804,8 @@ export type NamingConventionOption = (
792804
| 'public'
793805
| 'requiresQuotes'
794806
| 'static'
807+
| 'override'
808+
| 'async'
795809
)[];
796810
}
797811
| {
@@ -842,6 +856,7 @@ export type NamingConventionOption = (
842856
| 'public'
843857
| 'requiresQuotes'
844858
| 'static'
859+
| 'override'
845860
)[];
846861
types?: ('boolean' | 'string' | 'number' | 'function' | 'array')[];
847862
}

src/rules/typescript-eslint/no-extra-parens.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export type NoExtraParensOption =
1919
enforceForSequenceExpressions?: boolean;
2020
enforceForNewInMemberExpressions?: boolean;
2121
enforceForFunctionPrototypeMethods?: boolean;
22+
allowParensAfterCommentPattern?: string;
2223
},
2324
];
2425

src/rules/typescript-eslint/no-magic-numbers.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export interface NoMagicNumbersOption {
99
ignore?: (number | string)[];
1010
ignoreArrayIndexes?: boolean;
1111
ignoreDefaultValues?: boolean;
12+
ignoreClassFieldInitialValues?: boolean;
1213
ignoreNumericLiteralTypes?: boolean;
1314
ignoreEnums?: boolean;
1415
ignoreReadonlyClassProperties?: boolean;

src/rules/typescript-eslint/prefer-nullish-coalescing.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export interface PreferNullishCoalescingOption {
77
ignoreConditionalTests?: boolean;
88
ignoreTernaryTests?: boolean;
99
ignoreMixedLogicalExpressions?: boolean;
10-
forceSuggestionFixer?: boolean;
10+
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean;
1111
}
1212

1313
/**

src/rules/typescript-eslint/prefer-optional-chain.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import type { RuleConfig } from '../rule-config';
22

33
/**
4-
* Enforce using concise optional chain expressions instead of chained logical ands.
4+
* Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects.
55
*
66
* @see [prefer-optional-chain](https://typescript-eslint.io/rules/prefer-optional-chain)
77
*/
88
export type PreferOptionalChainRuleConfig = RuleConfig<[]>;
99

1010
/**
11-
* Enforce using concise optional chain expressions instead of chained logical ands.
11+
* Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects.
1212
*
1313
* @see [prefer-optional-chain](https://typescript-eslint.io/rules/prefer-optional-chain)
1414
*/
1515
export interface PreferOptionalChainRule {
1616
/**
17-
* Enforce using concise optional chain expressions instead of chained logical ands.
17+
* Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects.
1818
*
1919
* @see [prefer-optional-chain](https://typescript-eslint.io/rules/prefer-optional-chain)
2020
*/

0 commit comments

Comments
 (0)