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

Commit 91ab1ae

Browse files
committed
Add rule @typescript-eslint/no-unsafe-assignment
1 parent 3576cf1 commit 91ab1ae

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type { MemberOrderingRule } from './member-ordering';
55
import type { NoExplicitAnyRule } from './no-explicit-any';
66
import type { NoInferrableTypesRule } from './no-inferrable-types';
77
import type { NoParameterPropertiesRule } from './no-parameter-properties';
8+
import type { NoUnsafeAssignmentRule } from './no-unsafe-assignment';
89

910
/**
1011
* All @typescript-eslint rules.
@@ -15,4 +16,5 @@ export type TypeScriptEslintRules = BanTsCommentRule &
1516
MemberOrderingRule &
1617
NoExplicitAnyRule &
1718
NoInferrableTypesRule &
18-
NoParameterPropertiesRule;
19+
NoParameterPropertiesRule &
20+
NoUnsafeAssignmentRule;
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+
* Disallows assigning any to variables and properties.
5+
*
6+
* @see [no-unsafe-assignment](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md)
7+
*/
8+
export type NoUnsafeAssignmentRuleConfig = RuleConfig<[]>;
9+
10+
/**
11+
* Disallows assigning any to variables and properties.
12+
*
13+
* @see [no-unsafe-assignment](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md)
14+
*/
15+
export interface NoUnsafeAssignmentRule {
16+
/**
17+
* Disallows assigning any to variables and properties.
18+
*
19+
* @see [no-unsafe-assignment](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md)
20+
*/
21+
'@typescript-eslint/no-unsafe-assignment': NoUnsafeAssignmentRuleConfig;
22+
}

0 commit comments

Comments
 (0)