Skip to content

Commit 918ce88

Browse files
chore(ci): [bot] format code
1 parent 4bdf352 commit 918ce88

4 files changed

Lines changed: 16 additions & 12 deletions

File tree

docs/README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,7 @@ When you use legacy TypeScript decorator by enabling `emitDecoratorMetadata` in
615615
decorators. In this case, you can give extra swc configuration in the `tsup.config.ts` file.
616616

617617
For example, if you have to define `useDefineForClassFields`, you can do that as follows:
618+
618619
```ts
619620
import { defineConfig } from 'tsup'
620621

@@ -626,10 +627,10 @@ export default defineConfig({
626627
swc: {
627628
jsc: {
628629
transform: {
629-
useDefineForClassFields: true
630-
}
631-
}
632-
}
630+
useDefineForClassFields: true,
631+
},
632+
},
633+
},
633634
})
634635
```
635636

@@ -648,9 +649,9 @@ Note: some SWC options cannot be configured:
648649
"keepClassNames": true,
649650
"target": "es2022"
650651
}
651-
```
652+
```
652653

653-
You can also define a custom `.swcrc` configuration file. Just set `swcrc` to `true`
654+
You can also define a custom `.swcrc` configuration file. Just set `swcrc` to `true`
654655
in `tsup.config.ts` to allow SWC plugin to discover automatically your custom swc config file.
655656

656657
```ts
@@ -662,8 +663,8 @@ export default defineConfig({
662663
sourcemap: true,
663664
clean: true,
664665
swc: {
665-
swcrc: true
666-
}
666+
swcrc: true,
667+
},
667668
})
668669
```
669670

src/esbuild/swc.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ import type { Logger } from '../log'
99

1010
export type SwcPluginConfig = { logger: Logger } & Options
1111

12-
export const swcPlugin = ({ logger, ...swcOptions }: SwcPluginConfig): Plugin => {
12+
export const swcPlugin = ({
13+
logger,
14+
...swcOptions
15+
}: SwcPluginConfig): Plugin => {
1316
return {
1417
name: 'swc',
1518

src/options.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,8 @@ export type Options = {
291291
* @default true
292292
*/
293293
removeNodeProtocol?: boolean
294-
295-
swc?: SwcPluginConfig;
294+
295+
swc?: SwcPluginConfig
296296
}
297297

298298
export interface NormalizedExperimentalDtsConfig extends ExperimentalDtsConfig {

vitest.config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ export default defineConfig({
44
test: {
55
testTimeout: 50000,
66
globalSetup: 'vitest-global.ts',
7-
include: ["test/*.test.ts", "src/**/*.test.ts"]
7+
include: ['test/*.test.ts', 'src/**/*.test.ts'],
88
},
99
})

0 commit comments

Comments
 (0)