aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Beltran <ben@nsovocal.com>2020-02-15 23:03:37 +0100
committerBen Beltran <ben@nsovocal.com>2020-02-15 23:03:37 +0100
commit41247723b2940efe89648749b90e56d582bdfb89 (patch)
tree0fd6b070290b55444ab30b60892a61fdf1dc228b
parent24be7b5399ae4162702ad9a1f17b5711922a2da4 (diff)
Fix linter and linteer warnings
-rw-r--r--.eslintrc2
-rw-r--r--app/application.js2
-rw-r--r--app/stores/forums.js5
-rw-r--r--app/utils/glyph_hash.js32
-rw-r--r--lib/forum.js2
-rw-r--r--package.json2
6 files changed, 24 insertions, 21 deletions
diff --git a/.eslintrc b/.eslintrc
index 68bd8d3..bd7f885 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -1,6 +1,6 @@
{
"extends": [
- "eslint-config-hapi"
+ "@hapi/eslint-config-hapi"
],
"rules": {
"indent": [
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: [
- "☽",
- "☆",
- "♢",
- "♡",
- "╱",
- "╲",
- "╳",
- "〰",
- "▷",
- "⏊",
- "〒",
- "▢",
- "◯",
- "⏃",
- "⏀",
- "⏆"
+ '☽',
+ '☆',
+ '♢',
+ '♡',
+ '╱',
+ '╲',
+ '╳',
+ '〰',
+ '▷',
+ '⏊',
+ '〒',
+ '▢',
+ '◯',
+ '⏃',
+ '⏀',
+ '⏆'
]
};
diff --git a/lib/forum.js b/lib/forum.js
index d095e47..f09e8dd 100644
--- a/lib/forum.js
+++ b/lib/forum.js
@@ -85,4 +85,4 @@ export default class Forum {
console.log(' ^+---------+');
console.log(' (.) ');
}
-};
+}
diff --git a/package.json b/package.json
index bd75030..704c540 100644
--- a/package.json
+++ b/package.json
@@ -17,7 +17,7 @@
"scripts": {
"build": "parcel build --no-source-maps ./app/index.html",
"document": "jsdoc2md > doc/README.md",
- "lint": "eslint lib app bin",
+ "lint": "eslint lib app bin/forum",
"linthtml": "htmlhint",
"setup-hooks": "ln -s ../../scripts/git-hooks/pre-commit .git/hooks/pre-commit",
"test": "lab -r lab-markdown-reporter -o doc/COVERAGE.md -r console -o stdout -c --coverage-path lib -L -t 100 test",