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

Commit ddc609c

Browse files
committed
Add curly rule
1 parent b78bbc2 commit ddc609c

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

src/rules/eslint/curly.d.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import type { RuleConfig } from '../rule-config';
2+
3+
/**
4+
* Option.
5+
*/
6+
export type CurlyOption = 'all' | 'multi' | 'multi-line' | 'multi-or-nest' | 'ignore';
7+
8+
/**
9+
* Options.
10+
*/
11+
export type CurlyOptions = [CurlyOption?] | [('multi' | 'multi-line' | 'multi-or-nest')?, 'consistent'?];
12+
13+
/**
14+
* Require Following Curly Brace Conventions.
15+
*
16+
* @see [curly](https://eslint.org/docs/rules/curly)
17+
*/
18+
export type CurlyRuleConfig = RuleConfig<CurlyOptions>;
19+
20+
/**
21+
* Require Following Curly Brace Conventions.
22+
*
23+
* @see [curly](https://eslint.org/docs/rules/curly)
24+
*/
25+
export interface CurlyRule {
26+
/**
27+
* Require Following Curly Brace Conventions.
28+
*
29+
* @see [curly](https://eslint.org/docs/rules/curly)
30+
*/
31+
curly: CurlyRuleConfig;
32+
}

src/rules/eslint/index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import type { CommaDangleRule } from './comma-dangle';
2+
import type { CurlyRule } from './curly';
23
import type { NoDebuggerRule } from './no-debugger';
34
import type { QuotesRule } from './quotes';
45
import type { SemiRule } from './semi';
56

67
/**
78
* All eslint rules.
89
*/
9-
export type EslintRules = CommaDangleRule & NoDebuggerRule & QuotesRule & SemiRule;
10+
export type EslintRules = CommaDangleRule & CurlyRule & NoDebuggerRule & QuotesRule & SemiRule;

0 commit comments

Comments
 (0)