Skip to content

Commit fd5ad97

Browse files
committed
fix lint
1 parent e1dfadf commit fd5ad97

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/runtime/internal/dev.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { custom_event, append, insert, detach, listen, attr } from './dom';
2-
import { SvelteComponent, Props, SvelteComponentOptions, SvelteComponentOptionsPrivate, SvelteSlotOptions} from './Component';
2+
import { SvelteComponent, Props, SvelteComponentOptions, SvelteComponentOptionsPrivate } from './Component';
33

44
export function dispatch_dev<T=any>(type: string, detail?: T) {
55
document.dispatchEvent(custom_event(type, { version: '__VERSION__', ...detail }));

src/runtime/slot/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ function create_root_slot_fn(elements: Node[]) {
1818
}
1919
},
2020

21-
l: noop,
21+
l: noop
2222
};
2323
};
2424
}
2525

2626
export function createSlot(input: Record<string, Node | Node[]>) {
27-
const slots: Record<string, ReturnType<typeof create_root_slot_fn>[]> = {};
27+
const slots: Record<string, Array<ReturnType<typeof create_root_slot_fn>>> = {};
2828
for (const key in input) {
2929
const nodeOrNodeList = input[key];
3030
const nodeList = Array.isArray(nodeOrNodeList) ? nodeOrNodeList : [nodeOrNodeList];
@@ -34,8 +34,8 @@ export function createSlot(input: Record<string, Node | Node[]>) {
3434
}
3535

3636
export function slot(componentClass: typeof SvelteComponent, options: SvelteSlotOptions): Element[] {
37-
const wrapper = document.createElement("div");
37+
const wrapper = document.createElement('div');
3838
new componentClass({...options, target: wrapper} as SvelteComponentOptionsPrivate) as any;
3939
// @TODO this is a workaround until src/compiler/compile/render_dom/Block.ts is extended to expose created HTML element
40-
return Array.from(wrapper.children);;
40+
return Array.from(wrapper.children);
4141
}

test/runtime/samples/root-component-slot/_config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ export default {
1212
const another_slot_el = window.document.createTextNode('another slot');
1313
const conditional_slot_el = window.document.createElement('div');
1414
conditional_slot_el.innerHTML = 'conditional slot';
15-
const Nested = require(`./nested.svelte`).default;
15+
const Nested = require('./nested.svelte').default;
1616
return {
1717
slots: createSlot({
1818
default: default_el,
1919
'my-slot': my_slot_els,
2020
'another-slot-with-content': another_slot_el,
2121
'conditional-slot': conditional_slot_el,
22-
'slot-with-content-from-nested': slot(Nested),
23-
}),
22+
'slot-with-content-from-nested': slot(Nested)
23+
})
2424
};
2525
},
2626

0 commit comments

Comments
 (0)