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

Commit 7bcf4b1

Browse files
committed
Add rule @typescript-eslint/adjacent-overload-signatures
1 parent d145e83 commit 7bcf4b1

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import type { RuleConfig } from '../rule-config';
2+
3+
/**
4+
* Require that member overloads be consecutive.
5+
*
6+
* @see [adjacent-overload-signatures](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md)
7+
*/
8+
export type AdjacentOverloadSignaturesRuleConfig = RuleConfig<[]>;
9+
10+
/**
11+
* Require that member overloads be consecutive.
12+
*
13+
* @see [adjacent-overload-signatures](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md)
14+
*/
15+
export interface AdjacentOverloadSignaturesRule {
16+
/**
17+
* Require that member overloads be consecutive.
18+
*
19+
* @see [adjacent-overload-signatures](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md)
20+
*/
21+
'@typescript-eslint/adjacent-overload-signatures': AdjacentOverloadSignaturesRuleConfig;
22+
}

src/rules/typescript-eslint/index.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { AdjacentOverloadSignaturesRule } from './adjacent-overload-signatures';
12
import type { BanTsCommentRule } from './ban-ts-comment';
23
import type { ExplicitFunctionReturnTypeRule } from './explicit-function-return-type';
34
import type { InterfaceNamePrefixRule } from './interface-name-prefix';
@@ -16,7 +17,8 @@ import type { TypedefRule } from './typedef';
1617
/**
1718
* All @typescript-eslint rules.
1819
*/
19-
export type TypeScriptEslintRules = BanTsCommentRule &
20+
export type TypeScriptEslintRules = AdjacentOverloadSignaturesRule &
21+
BanTsCommentRule &
2022
ExplicitFunctionReturnTypeRule &
2123
InterfaceNamePrefixRule &
2224
MemberOrderingRule &

0 commit comments

Comments
 (0)