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

Commit 11ecc5a

Browse files
committed
Add eslint rules
1 parent e23b186 commit 11ecc5a

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

src/rules/eslint/lines-between-class-members.d.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,25 @@ export interface LinesBetweenClassMembersConfig {
1010
/**
1111
* Option.
1212
*/
13-
export type LinesBetweenClassMembersOption = 'always' | 'never';
13+
export type LinesBetweenClassMembersOption =
14+
| {
15+
/**
16+
* @minItems 1
17+
*/
18+
enforce: [
19+
{
20+
blankLine: 'always' | 'never';
21+
prev: 'method' | 'field' | '*';
22+
next: 'method' | 'field' | '*';
23+
},
24+
...{
25+
blankLine: 'always' | 'never';
26+
prev: 'method' | 'field' | '*';
27+
next: 'method' | 'field' | '*';
28+
}[],
29+
];
30+
}
31+
| ('always' | 'never');
1432

1533
/**
1634
* Options.

src/rules/eslint/no-promise-executor-return.d.ts

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

3+
/**
4+
* Option.
5+
*/
6+
export interface NoPromiseExecutorReturnOption {
7+
allowVoid?: boolean;
8+
}
9+
10+
/**
11+
* Options.
12+
*/
13+
export type NoPromiseExecutorReturnOptions = [NoPromiseExecutorReturnOption?];
14+
315
/**
416
* Disallow returning values from Promise executor functions.
517
*
618
* @see [no-promise-executor-return](https://eslint.org/docs/latest/rules/no-promise-executor-return)
719
*/
8-
export type NoPromiseExecutorReturnRuleConfig = RuleConfig<[]>;
20+
export type NoPromiseExecutorReturnRuleConfig =
21+
RuleConfig<NoPromiseExecutorReturnOptions>;
922

1023
/**
1124
* Disallow returning values from Promise executor functions.

0 commit comments

Comments
 (0)