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

Commit fb7e70e

Browse files
committed
Update typescript-eslint rules
1 parent e56acce commit fb7e70e

File tree

3 files changed

+402
-8
lines changed

3 files changed

+402
-8
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import type { IndentRule } from './indent';
2525
import type { InitDeclarationsRule } from './init-declarations';
2626
import type { KeySpacingRule } from './key-spacing';
2727
import type { KeywordSpacingRule } from './keyword-spacing';
28+
import type { LinesAroundCommentRule } from './lines-around-comment';
2829
import type { LinesBetweenClassMembersRule } from './lines-between-class-members';
2930
import type { MemberDelimiterStyleRule } from './member-delimiter-style';
3031
import type { MemberOrderingRule } from './member-ordering';
@@ -162,6 +163,7 @@ export type TypeScriptRules = AdjacentOverloadSignaturesRule &
162163
InitDeclarationsRule &
163164
KeySpacingRule &
164165
KeywordSpacingRule &
166+
LinesAroundCommentRule &
165167
LinesBetweenClassMembersRule &
166168
MemberDelimiterStyleRule &
167169
MemberOrderingRule &
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import type { RuleConfig } from '../rule-config';
2+
3+
/**
4+
* Option.
5+
*/
6+
export type LinesAroundCommentOption =
7+
| []
8+
| [
9+
{
10+
beforeBlockComment?: boolean;
11+
afterBlockComment?: boolean;
12+
beforeLineComment?: boolean;
13+
afterLineComment?: boolean;
14+
allowBlockStart?: boolean;
15+
allowBlockEnd?: boolean;
16+
allowClassStart?: boolean;
17+
allowClassEnd?: boolean;
18+
allowObjectStart?: boolean;
19+
allowObjectEnd?: boolean;
20+
allowArrayStart?: boolean;
21+
allowArrayEnd?: boolean;
22+
allowInterfaceStart?: boolean;
23+
allowInterfaceEnd?: boolean;
24+
allowTypeStart?: boolean;
25+
allowTypeEnd?: boolean;
26+
allowEnumStart?: boolean;
27+
allowEnumEnd?: boolean;
28+
allowModuleStart?: boolean;
29+
allowModuleEnd?: boolean;
30+
ignorePattern?: string;
31+
applyDefaultIgnorePatterns?: boolean;
32+
},
33+
];
34+
35+
/**
36+
* Options.
37+
*/
38+
export type LinesAroundCommentOptions = LinesAroundCommentOption;
39+
40+
/**
41+
* Require empty lines around comments.
42+
*
43+
* @see [lines-around-comment](https://typescript-eslint.io/rules/lines-around-comment)
44+
*/
45+
export type LinesAroundCommentRuleConfig =
46+
RuleConfig<LinesAroundCommentOptions>;
47+
48+
/**
49+
* Require empty lines around comments.
50+
*
51+
* @see [lines-around-comment](https://typescript-eslint.io/rules/lines-around-comment)
52+
*/
53+
export interface LinesAroundCommentRule {
54+
/**
55+
* Require empty lines around comments.
56+
*
57+
* @see [lines-around-comment](https://typescript-eslint.io/rules/lines-around-comment)
58+
*/
59+
'@typescript-eslint/lines-around-comment': LinesAroundCommentRuleConfig;
60+
}

0 commit comments

Comments
 (0)