KainStropov
(Kislenko Mikhail)
December 11, 2020, 12:48pm
1
Hello!
I have normal import and type import from same file. For example:
import type { Foo } from './module';
import { Bar } from './module';
But analysis show me Code Smell about that they should be merged (rule ).
But I prefer to split type and normal import from same file. What I should do (except disable rule) to make it not mark it as code smell?
SonarQube 8.6 (build 39681)
SonarScaner CLI 4.5.0.2216
Yassin
(Yassin Kammoun)
January 21, 2021, 1:29pm
2
Hello @KainStropov ,
Welcome to SonarSource community.
Currently, the rule does not distinguish type imports from value imports. However, given the code sample you provided, I think it would make sense to support this distinction so that we only report on duplicated imports of the same type.
I created a ticket to address this issue.
Cheers,
Yassin
system
(system)
Closed
April 8, 2021, 8:43am
3
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.