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 +25
-1
lines changed
src/rules/typescript-eslint Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import type { NoParameterPropertiesRule } from './no-parameter-properties';
8
8
import type { NoUnsafeAssignmentRule } from './no-unsafe-assignment' ;
9
9
import type { NoUnusedVarsRule } from './no-unused-vars' ;
10
10
import type { PreferNullishCoalescingRule } from './prefer-nullish-coalescing' ;
11
+ import type { PreferOptionalChainRule } from './prefer-optional-chain' ;
11
12
12
13
/**
13
14
* All @typescript-eslint rules.
@@ -21,4 +22,5 @@ export type TypeScriptEslintRules = BanTsCommentRule &
21
22
NoParameterPropertiesRule &
22
23
NoUnsafeAssignmentRule &
23
24
NoUnusedVarsRule &
24
- PreferNullishCoalescingRule ;
25
+ PreferNullishCoalescingRule &
26
+ PreferOptionalChainRule ;
Original file line number Diff line number Diff line change
1
+ import type { RuleConfig } from '../rule-config' ;
2
+
3
+ /**
4
+ * Prefer using concise optional chain expressions instead of chained logical ands.
5
+ *
6
+ * @see [prefer-optional-chain](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-optional-chain.md)
7
+ */
8
+ export type PreferOptionalChainRuleConfig = RuleConfig < [ ] > ;
9
+
10
+ /**
11
+ * Prefer using concise optional chain expressions instead of chained logical ands.
12
+ *
13
+ * @see [prefer-optional-chain](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-optional-chain.md)
14
+ */
15
+ export interface PreferOptionalChainRule {
16
+ /**
17
+ * Prefer using concise optional chain expressions instead of chained logical ands.
18
+ *
19
+ * @see [prefer-optional-chain](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-optional-chain.md)
20
+ */
21
+ '@typescript-eslint/prefer-optional-chain' : PreferOptionalChainRuleConfig ;
22
+ }
You can’t perform that action at this time.
0 commit comments