Skip to content

Commit fbad588

Browse files
committed
🚨 Fixed linter warnings
Signed-off-by: Ferdinand Thiessen <[email protected]>
1 parent deca80c commit fbad588

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

‎src/analyze.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ export const detectableModules: ModuleEntry[] = [
228228
detectableModules.push(
229229
["es.typed-array.from", PT.StaticMember, name, "from"],
230230
["es.typed-array.of", PT.StaticMember, name, "of"],
231-
[module, PT.Global, name]
231+
[module, PT.Global, name],
232232
)
233233
}))()
234234
/**
@@ -341,7 +341,7 @@ class Walker {
341341
}
342342
})
343343
this._modules.push(
344-
...filterModules.filter((m) => !usedModules.includes(m))
344+
...filterModules.filter((m) => !usedModules.includes(m)),
345345
)
346346
}
347347

@@ -370,7 +370,7 @@ class Walker {
370370
registerCall(
371371
module: string,
372372
object: string,
373-
validator: (args: Array<unknown>) => boolean
373+
validator: (args: Array<unknown>) => boolean,
374374
) {
375375
if (!this._calls.has(object)) {
376376
this._calls.set(object, [])
@@ -416,15 +416,15 @@ class Walker {
416416
path.node.property.type === "Identifier"
417417
? path.node.property.name
418418
: path.node.property.type === "Literal" &&
419-
typeof path.node.property.value === "string"
420-
? path.node.property.value
421-
: undefined
419+
typeof path.node.property.value === "string"
420+
? path.node.property.value
421+
: undefined
422422
if (!property) return
423423

424424
// Static members (e.g. `Object.assign`)
425425
if (state._members.has(path.node.object.name)) {
426426
const [prop, module] = state._members.get(
427-
path.node.object.name
427+
path.node.object.name,
428428
)
429429
if (property === prop) {
430430
state._modules.push(module)
@@ -463,7 +463,7 @@ export function filterModules(modules: readonly string[], ast: any) {
463463
scope: true,
464464
},
465465
}),
466-
walker
466+
walker,
467467
)
468468
return [...new Set(walker._modules)]
469469
}

‎src/plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export type CoreJSPluginOptions = Partial<
2121
}
2222

2323
export function corejsPlugin(
24-
options: CoreJSPluginOptions = { modules: "core-js/es" }
24+
options: CoreJSPluginOptions = { modules: "core-js/es" },
2525
) {
2626
const config: CoreJSPluginOptions = {
2727
modules: options.modules,
@@ -58,7 +58,7 @@ export function corejsPlugin(
5858
list = filterModules(list, ast)
5959
}
6060
const polyfills = list.map(
61-
(p) => `import 'core-js/modules/${p}.js';`
61+
(p) => `import 'core-js/modules/${p}.js';`,
6262
)
6363

6464
const magicString = new MagicString(code)

0 commit comments

Comments
 (0)