Skip to content

Commit 2783967

Browse files
committed
chore: lint
1 parent 00c9732 commit 2783967

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

examples/react-component-bundle/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const Counter: React.FC = () => {
88

99
return (
1010
<div>
11-
<h1 className='title'></h1>
11+
<h1 className="title" />
1212
<h2 className="counter-text">Counter: {count}</h2>
1313
<CounterButton onClick={decrement} label="-" />
1414
<CounterButton onClick={increment} label="+" />
Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
1-
import { RsbuildConfig } from "@rsbuild/core";
2-
import { Format } from "../types";
1+
import type { RsbuildConfig } from '@rsbuild/core';
2+
import type { Format } from '../types';
33

44
export const composeAssetConfig = (
55
bundle: boolean,
6-
format: Format
6+
format: Format,
77
): RsbuildConfig => {
8-
if(format === 'esm' || format === 'cjs') {
9-
if(bundle) {
8+
if (format === 'esm' || format === 'cjs') {
9+
if (bundle) {
1010
return {
1111
output: {
1212
// default: no inline asset
1313
dataUriLimit: 0,
14-
assetPrefix: 'auto' // we currently not support import asset in js because of 'auto' publicPath runtime
14+
assetPrefix: 'auto', // we currently not support import asset in js because of 'auto' publicPath runtime
1515
},
16-
}
17-
} else {
18-
// TODO: bundleless
19-
return {}
16+
};
2017
}
18+
// TODO: bundleless
19+
return {};
2120
}
2221

2322
// mf and umd etc
24-
return {}
25-
};
23+
return {};
24+
};

packages/core/src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import fs from 'node:fs';
22
import path, { dirname, extname, isAbsolute, join } from 'node:path';
3-
import { composeAssetConfig } from './asset/assetConfig'
43
import {
54
type EnvironmentConfig,
65
type RsbuildConfig,
@@ -12,6 +11,7 @@ import {
1211
rspack,
1312
} from '@rsbuild/core';
1413
import { glob } from 'tinyglobby';
14+
import { composeAssetConfig } from './asset/assetConfig';
1515
import {
1616
DEFAULT_CONFIG_EXTENSIONS,
1717
DEFAULT_CONFIG_NAME,

packages/core/src/css/cssConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export const composeCssConfig = (
155155
bundle = true,
156156
): RsbuildConfig => {
157157
if (bundle || rootDir === null) {
158-
return {}
158+
return {};
159159
}
160160

161161
return {

0 commit comments

Comments
 (0)