From 41247723b2940efe89648749b90e56d582bdfb89 Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Sat, 15 Feb 2020 23:03:37 +0100 Subject: Fix linter and linteer warnings --- app/application.js | 2 ++ app/stores/forums.js | 5 +++-- app/utils/glyph_hash.js | 32 ++++++++++++++++---------------- 3 files changed, 21 insertions(+), 18 deletions(-) (limited to 'app') diff --git a/app/application.js b/app/application.js index 6f44869..f5012fd 100644 --- a/app/application.js +++ b/app/application.js @@ -1,5 +1,7 @@ import Forum from './forum.svelte'; +/* global document */ + const forum = new Forum({ target: document.body, props: { diff --git a/app/stores/forums.js b/app/stores/forums.js index adc8758..c473124 100644 --- a/app/stores/forums.js +++ b/app/stores/forums.js @@ -72,10 +72,11 @@ internals.forums = [ export const forums = writable(internals.forums); -export function addForum() { +export const addForum = function addForum() { + const id = Math.random(); - forums.update((forums) => ([...forums, + forums.update((originalForums) => ([...originalForums, { id, glyph: 'の', diff --git a/app/utils/glyph_hash.js b/app/utils/glyph_hash.js index c074376..2d9b3f3 100644 --- a/app/utils/glyph_hash.js +++ b/app/utils/glyph_hash.js @@ -1,22 +1,22 @@ const internals = { kSplitterRegex: /.{1,8}/g, kGlyphs: [ - "☽", - "☆", - "♢", - "♡", - "╱", - "╲", - "╳", - "〰", - "▷", - "⏊", - "〒", - "▢", - "◯", - "⏃", - "⏀", - "⏆" + '☽', + '☆', + '♢', + '♡', + '╱', + '╲', + '╳', + '〰', + '▷', + '⏊', + '〒', + '▢', + '◯', + '⏃', + '⏀', + '⏆' ] }; -- cgit