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

Commit 3795974

Browse files
committed
Update eslint rules
1 parent c891e70 commit 3795974

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

src/rules/eslint/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ import type { LinebreakStyleRule } from './linebreak-style';
5858
import type { LinesAroundCommentRule } from './lines-around-comment';
5959
import type { LinesAroundDirectiveRule } from './lines-around-directive';
6060
import type { LinesBetweenClassMembersRule } from './lines-between-class-members';
61+
import type { LogicalAssignmentOperatorsRule } from './logical-assignment-operators';
6162
import type { MaxClassesPerFileRule } from './max-classes-per-file';
6263
import type { MaxDepthRule } from './max-depth';
6364
import type { MaxLenRule } from './max-len';
@@ -348,6 +349,7 @@ export type EslintRules = AccessorPairsRule &
348349
LinesAroundCommentRule &
349350
LinesAroundDirectiveRule &
350351
LinesBetweenClassMembersRule &
352+
LogicalAssignmentOperatorsRule &
351353
MaxClassesPerFileRule &
352354
MaxDepthRule &
353355
MaxLenRule &
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import type { RuleConfig } from '../rule-config';
2+
3+
/**
4+
* Option.
5+
*/
6+
export type LogicalAssignmentOperatorsOption = (
7+
| []
8+
| ['always']
9+
| [
10+
'always',
11+
{
12+
enforceForIfStatements?: boolean;
13+
},
14+
]
15+
| ['never']
16+
) &
17+
any[];
18+
19+
/**
20+
* Options.
21+
*/
22+
export type LogicalAssignmentOperatorsOptions =
23+
LogicalAssignmentOperatorsOption;
24+
25+
/**
26+
* Require or disallow logical assignment logical operator shorthand.
27+
*
28+
* @see [logical-assignment-operators](https://eslint.org/docs/rules/logical-assignment-operators)
29+
*/
30+
export type LogicalAssignmentOperatorsRuleConfig =
31+
RuleConfig<LogicalAssignmentOperatorsOptions>;
32+
33+
/**
34+
* Require or disallow logical assignment logical operator shorthand.
35+
*
36+
* @see [logical-assignment-operators](https://eslint.org/docs/rules/logical-assignment-operators)
37+
*/
38+
export interface LogicalAssignmentOperatorsRule {
39+
/**
40+
* Require or disallow logical assignment logical operator shorthand.
41+
*
42+
* @see [logical-assignment-operators](https://eslint.org/docs/rules/logical-assignment-operators)
43+
*/
44+
'logical-assignment-operators': LogicalAssignmentOperatorsRuleConfig;
45+
}

0 commit comments

Comments
 (0)