-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
package: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-pluginworking as intendedIssues that are closed as they are working as intendedIssues that are closed as they are working as intended
Description
The tslint rule 'no-unnecessary-type-assertion' reports an error only when the type assertions does not change the type of a variable. But this rule seems to report errors when the types of source variable and the receiver are different. These two rules are different, but the ROADMAP.md tells me these two rules are the same.
Example
let x: string | undefined;
let y: string | undefined = x!;
Consider about the code above. There is no error when using tslint rule 'no-unnecessary-type-assertion', but there are errors when using '@typescript-eslint/no-unnecessary-type-assertion'.
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
2.10.0 |
@typescript-eslint/parser |
2.10.0 |
TypeScript |
3.7.2 |
ESLint |
6.7.2 |
node |
12.13.0 |
npm |
6.12.0 |
vilicvane
Metadata
Metadata
Assignees
Labels
package: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-pluginworking as intendedIssues that are closed as they are working as intendedIssues that are closed as they are working as intended