Skip to content

Commit 74def8d

Browse files
askhatpathscale
authored andcommitted
fix: remove redundant signature type so the build won't fail
1 parent cdb30b6 commit 74def8d

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/analyzer.ts

+9-10
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import fs from "fs-extra";
77
import path from "path";
88
import traverse from "@babel/traverse";
99

10-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
11-
type Package = { [key: string]: any };
1210
type Data<K extends string, T> = { [P in K]?: T };
1311

1412
const parserOpts: jsparser.ParserOptions = {
@@ -43,8 +41,7 @@ const parserOpts: jsparser.ParserOptions = {
4341

4442
const vue3ui = resolveSync("@pathscale/vue3-ui", {
4543
basedir: __dirname,
46-
packageFilter(pkg: Package) {
47-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
44+
packageFilter(pkg) {
4845
if (pkg.module) pkg.main = pkg.module;
4946
return pkg;
5047
},
@@ -76,8 +73,11 @@ export function analyze(
7673
const whitelist = new Set<string>(["*", "html", "head", "body", "div", "app"]);
7774
let currentTag = "";
7875

79-
const idList = (
80-
Array.isArray(input) ? input : typeof input === "object" ? Object.values(input) : [input]
76+
const idList = (Array.isArray(input)
77+
? input
78+
: typeof input === "object"
79+
? Object.values(input)
80+
: [input]
8181
).map(id => normalizePath(path.resolve(id)));
8282

8383
const parser = new htmlparser.Parser(
@@ -97,7 +97,8 @@ export function analyze(
9797
onattribute(p, data) {
9898
for (const cl of data.split(" ")) whitelist.add(cl);
9999

100-
const prop = p.replace(":", ""); // remove : from props like :loading -> loading
100+
const prop = p.replace(":", "") // remove : from props like :loading -> loading
101+
101102

102103
if (kebabCase(currentTag).startsWith("v-")) {
103104
// optional
@@ -146,10 +147,8 @@ export function analyze(
146147
resolveSync(value, {
147148
basedir: path.dirname(id),
148149
extensions,
149-
packageFilter(pkg: Package) {
150-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment
150+
packageFilter(pkg) {
151151
if (pkg.module) pkg.main = pkg.module;
152-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
153152
return pkg;
154153
},
155154
}),

0 commit comments

Comments
 (0)