chore(lint): apply recommended lint rules

This commit is contained in:
Eric Liu 2019-12-29 15:37:56 -08:00
commit 866cc962cd
23 changed files with 35 additions and 54 deletions

View file

@ -39,12 +39,9 @@
});
$: if (switches[currentIndex]) {
dispatch('change', currentIndex);
selectedIndex = currentIndex;
currentId.set(switches[currentIndex].id);
switches = switches.map((_, i) => ({ ..._, selected: i === currentIndex }));
const { id, ...rest } = switches[currentIndex];
dispatch('change', { ...rest, index: currentIndex });
}
</script>