Skip to content

Commit 5b660d9

Browse files
committed
chore: lint
1 parent e47df19 commit 5b660d9

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/core/resolvers/tdesign.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,19 @@ export interface TDesignResolverOptions {
2323

2424
function getSideEffects(importName: string, options: TDesignResolverOptions): SideEffectsInfo | undefined {
2525
const { library = 'vue', importStyle = 'css' } = options
26-
const fileName = kebabCase(importName)
26+
let fileName = kebabCase(importName)
2727

28-
if (!importStyle) return
28+
if (!importStyle)
29+
return
2930

30-
if (fileName === 'config-provider') return
31-
32-
if (fileName === 'radio-group' || fileName === 'radio-button') fileName = 'radio'
31+
if (fileName === 'config-provider')
32+
return
3333

34-
if (importStyle === 'less') return `tdesign-${library}/esm/${fileName}/style`
34+
if (fileName === 'radio-group' || fileName === 'radio-button')
35+
fileName = 'radio'
36+
37+
if (importStyle === 'less')
38+
return `tdesign-${library}/esm/${fileName}/style`
3539

3640
return `tdesign-${library}/es/${fileName}/style`
3741
}

0 commit comments

Comments
 (0)