Skip to content

Commit c6e02ef

Browse files
committed
chore: lint
1 parent 284c94e commit c6e02ef

File tree

4 files changed

+108
-35
lines changed

4 files changed

+108
-35
lines changed

pnpm-lock.yaml

Lines changed: 82 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rsbuild-electron.config.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { defineConfig, rspack } from '@rsbuild/core';
2-
import { rsbuildConfig } from './rsbuild.config';
2+
import dotenv from 'dotenv';
33

44
import { PRODUCTION_URL } from './src/config';
5+
import { rsbuildConfig } from './rsbuild.config';
56

6-
import dotenv from 'dotenv';
77
dotenv.config();
88

99
// GitHub workflow uses an empty string as the default value if it's not in repository variables, so we cannot define a default value here
@@ -25,7 +25,7 @@ export default defineConfig({
2525
main: {
2626
source: {
2727
entry: {
28-
'main': './src/electron/main.ts',
28+
main: './src/electron/main.ts',
2929
},
3030
},
3131

@@ -40,12 +40,12 @@ export default defineConfig({
4040
BASE_URL,
4141
IS_PREVIEW: false,
4242
}),
43-
]
43+
],
4444

4545
// externals: {
4646
// electron: 'require("electron")',
4747
// },
48-
}
48+
},
4949
},
5050

5151
output: {
@@ -59,8 +59,8 @@ export default defineConfig({
5959
preload: {
6060
source: {
6161
entry: {
62-
'preload': './src/electron/preload.ts',
63-
}
62+
preload: './src/electron/preload.ts',
63+
},
6464
},
6565

6666
tools: {
@@ -74,12 +74,12 @@ export default defineConfig({
7474
BASE_URL,
7575
IS_PREVIEW: false,
7676
}),
77-
]
77+
],
7878

7979
// externals: {
8080
// electron: 'require("electron")',
8181
// },
82-
}
82+
},
8383
},
8484

8585
output: {
@@ -101,7 +101,6 @@ export default defineConfig({
101101
// clean: false
102102
// }
103103

104-
105104
plugins: [
106105
// @ts-expect-error
107106
new rspack.EnvironmentPlugin({
@@ -114,7 +113,7 @@ export default defineConfig({
114113
...rsbuildConfig.tools?.rspack,
115114
},
116115
...rsbuildConfig.tools,
117-
}
118-
}
116+
},
117+
},
119118
},
120119
});

rsbuild.config.ts

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
import { defineConfig, RsbuildConfig, rspack } from '@rsbuild/core';
1+
import type { RsbuildConfig } from '@rsbuild/core';
2+
import { defineConfig, rspack } from '@rsbuild/core';
23
import { pluginSass } from '@rsbuild/plugin-sass';
34
import dotenv from 'dotenv';
4-
import path from 'path';
55
import { GitRevisionPlugin } from 'git-revision-webpack-plugin';
6-
import { version as appVersion } from './package.json';
6+
import path from 'path';
7+
78
import { PRODUCTION_URL } from './src/config';
9+
import { version as appVersion } from './package.json';
810

911
const {
1012
HEAD,
@@ -40,7 +42,6 @@ const CSP = `
4042
form-action 'none';`
4143
.replace(/\s+/g, ' ').trim();
4244

43-
4445
export const rsbuildConfig: RsbuildConfig = {
4546
plugins: [
4647
pluginSass(),
@@ -53,14 +54,14 @@ export const rsbuildConfig: RsbuildConfig = {
5354
},
5455

5556
dev: {
56-
assetPrefix: '/'
57+
assetPrefix: '/',
5758
},
5859

5960
tools: {
6061
postcss: {
6162
postcssOptions: {
62-
plugins: ['autoprefixer']
63-
}
63+
plugins: ['autoprefixer'],
64+
},
6465
},
6566

6667
htmlPlugin: {
@@ -98,11 +99,11 @@ export const rsbuildConfig: RsbuildConfig = {
9899
test: /\.(txt|tl|strings)$/i,
99100
type: 'asset/source',
100101
},
101-
]
102+
],
102103
},
103104

104105
ignoreWarnings: [
105-
/sass/
106+
/sass/,
106107
],
107108

108109
plugins: [
@@ -161,7 +162,7 @@ export const rsbuildConfig: RsbuildConfig = {
161162
chunkIds: 'named',
162163
}),
163164
},
164-
}
165+
},
165166
},
166167

167168
resolve: {
@@ -171,7 +172,7 @@ export const rsbuildConfig: RsbuildConfig = {
171172
buffer: require.resolve('buffer/'),
172173
fs: false,
173174
crypto: false,
174-
}
175+
},
175176
},
176177

177178
server: {
@@ -201,16 +202,13 @@ export const rsbuildConfig: RsbuildConfig = {
201202
},
202203
],
203204
},
204-
}
205+
};
205206

206207
export default defineConfig(rsbuildConfig);
207208

208-
209209
function getGitMetadata() {
210210
const gitRevisionPlugin = new GitRevisionPlugin();
211211
const branch = HEAD || gitRevisionPlugin.branch();
212212
const commit = gitRevisionPlugin.commithash()?.substring(0, 7);
213213
return { branch, commit };
214214
}
215-
216-

src/global/actions/api/middleSearch.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import { ApiMessage, ApiPeer, MAIN_THREAD_ID } from '../../../api/types';
1+
import type { ApiMessage, ApiPeer } from '../../../api/types';
22
import type {
33
ChatMediaSearchParams, ChatMediaSearchSegment, LoadingState, SharedMediaType, ThreadId,
44
} from '../../../types';
55
import type { ActionReturnType, GlobalState, TabArgs } from '../../types';
6+
import { MAIN_THREAD_ID } from '../../../api/types';
67
import { LoadMoreDirection } from '../../../types';
78

89
import {

0 commit comments

Comments
 (0)