Skip to content

Commit 10a83ea

Browse files
committed
perf: bundle lint-staged
1 parent e681a2a commit 10a83ea

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

‎packages/rstack/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@
3535
"dependencies": {
3636
"@rsbuild/core": "catalog:",
3737
"@rslib/core": "catalog:",
38-
"@rstest/core": "catalog:",
39-
"lint-staged": "catalog:"
38+
"@rstest/core": "catalog:"
4039
},
4140
"devDependencies": {
4241
"@rstest/adapter-rsbuild": "catalog:",
4342
"@types/node": "catalog:",
43+
"lint-staged": "catalog:",
4444
"typescript": "catalog:"
4545
},
4646
"engines": {

‎packages/rstack/src/staged.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import lintStaged from 'lint-staged';
21
import { clearConfig, getConfig, loadRstackConfig } from './config.js';
32

43
const stagedHelpMessage = `Rstack v${RSTACK_VERSION}
@@ -33,6 +32,10 @@ export async function runStagedCLI(args: string[]): Promise<void> {
3332
);
3433
}
3534

35+
const { default: lintStaged } = await import(
36+
/* rspackChunkName: 'lintStaged' */
37+
'lint-staged'
38+
);
3639
const success = await lintStaged({
3740
config: stagedConfig,
3841
});

‎pnpm-lock.yaml‎

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

0 commit comments

Comments
 (0)