@@ -7,8 +7,6 @@ import fs from "fs-extra";
7
7
import path from "path" ;
8
8
import traverse from "@babel/traverse" ;
9
9
10
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
11
- type Package = { [ key : string ] : any } ;
12
10
type Data < K extends string , T > = { [ P in K ] ?: T } ;
13
11
14
12
const parserOpts : jsparser . ParserOptions = {
@@ -43,8 +41,7 @@ const parserOpts: jsparser.ParserOptions = {
43
41
44
42
const vue3ui = resolveSync ( "@pathscale/vue3-ui" , {
45
43
basedir : __dirname ,
46
- packageFilter ( pkg : Package ) {
47
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
44
+ packageFilter ( pkg ) {
48
45
if ( pkg . module ) pkg . main = pkg . module ;
49
46
return pkg ;
50
47
} ,
@@ -76,8 +73,11 @@ export function analyze(
76
73
const whitelist = new Set < string > ( [ "*" , "html" , "head" , "body" , "div" , "app" ] ) ;
77
74
let currentTag = "" ;
78
75
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 ]
81
81
) . map ( id => normalizePath ( path . resolve ( id ) ) ) ;
82
82
83
83
const parser = new htmlparser . Parser (
@@ -97,7 +97,8 @@ export function analyze(
97
97
onattribute ( p , data ) {
98
98
for ( const cl of data . split ( " " ) ) whitelist . add ( cl ) ;
99
99
100
- const prop = p . replace ( ":" , "" ) ; // remove : from props like :loading -> loading
100
+ const prop = p . replace ( ":" , "" ) // remove : from props like :loading -> loading
101
+
101
102
102
103
if ( kebabCase ( currentTag ) . startsWith ( "v-" ) ) {
103
104
// optional
@@ -146,10 +147,8 @@ export function analyze(
146
147
resolveSync ( value , {
147
148
basedir : path . dirname ( id ) ,
148
149
extensions,
149
- packageFilter ( pkg : Package ) {
150
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment
150
+ packageFilter ( pkg ) {
151
151
if ( pkg . module ) pkg . main = pkg . module ;
152
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return
153
152
return pkg ;
154
153
} ,
155
154
} ) ,
0 commit comments