Skip to content

Commit 871763e

Browse files
committed
Fix deepsource issues
1 parent 047155b commit 871763e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/__tests__/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import fs from "node:fs";
22
import path from "node:path";
33
import { describe, test, beforeAll } from "vitest";
4-
import esbuild, { build } from "esbuild";
4+
import esbuild from "esbuild";
55
import react18Plugin, { React18PluginOptions } from "../src";
66
import glob from "tiny-glob";
77
import cssPlugin from "esbuild-plugin-react18-css";

lib/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function replaceSource(sourceReplacePattern: ReplacePattern, build: PluginBuild)
105105
if (sourceReplacePattern.replaceParams.length === 0) return;
106106
/** Add namespace file to avoid conflict with ignored files */
107107
build.onLoad({ filter: sourceReplacePattern.pathPattern, namespace: "file" }, args => {
108-
let text = fs.readFileSync(args.path, "utf8");
108+
const text = fs.readFileSync(args.path, "utf8");
109109
/** todo: test if loader is a valid OnLoadResult.loader
110110
* If it is not a valid loader error will be thrown
111111
*/

0 commit comments

Comments
 (0)