-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issueenhancement: new base rule extensionNew base rule extension required to handle a TS specific caseNew base rule extension required to handle a TS specific casepackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
const foo = { bar: 1 as const };
const bar: number = foo.bar;
// Currently fixed to
const { bar } = foo;
- Fixer should change code to
const { bar }: { bar: number } = foo
, removing type annotation is unsafe - I think it would make sense to add an option to disable rule in this case, annotations on destructured variables aren't very pretty
nicu-chiciuc, ktkiiski, danvk, philippkuehn, Natoandro and 9 more
Metadata
Metadata
Assignees
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issueenhancement: new base rule extensionNew base rule extension required to handle a TS specific caseNew base rule extension required to handle a TS specific casepackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin