]> git.r.bdr.sh - rbdr/forum/commitdiff
Fix linter and linteer warnings
authorBen Beltran <redacted>
Sat, 15 Feb 2020 22:03:37 +0000 (23:03 +0100)
committerBen Beltran <redacted>
Sat, 15 Feb 2020 22:03:37 +0000 (23:03 +0100)
.eslintrc
app/application.js
app/stores/forums.js
app/utils/glyph_hash.js
lib/forum.js
package.json

index 68bd8d36a04bd5431d54138f49f06ed9e46d517f..bd7f88597119de48c7531b5bffe1a07f481dccf8 100644 (file)
--- a/.eslintrc
+++ b/.eslintrc
@@ -1,6 +1,6 @@
 {
   "extends": [
-    "eslint-config-hapi"
+    "@hapi/eslint-config-hapi"
   ],
   "rules": {
     "indent": [
index 6f4486940ae892ec26f7736bf0bd276ff759b81e..f5012fda6ee87d224bcb6876ed860a7c3f3337dd 100644 (file)
@@ -1,5 +1,7 @@
 import Forum from './forum.svelte';
 
+/* global document */
+
 const forum = new Forum({
   target: document.body,
   props: {
index adc8758d1fc9e20a1efda07f1058b1d4bc09c880..c4731247611fe71431dbe87f42410523b1becb93 100644 (file)
@@ -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: 'の',
index c074376a616676992cb2657976a1a927857ed1ae..2d9b3f33df276a740e791a9f7fc18dc68b670ad5 100644 (file)
@@ -1,22 +1,22 @@
 const internals = {
   kSplitterRegex: /.{1,8}/g,
   kGlyphs: [
-    "☽",
-    "☆",
-    "♢",
-    "♡",
-    "╱",
-    "╲",
-    "╳",
-    "〰",
-    "▷",
-    "⏊",
-    "〒",
-    "▢",
-    "◯",
-    "⏃",
-    "⏀",
-    "⏆"
+    '☽',
+    '☆',
+    '♢',
+    '♡',
+    '╱',
+    '╲',
+    '╳',
+    '〰',
+    '▷',
+    '⏊',
+    '〒',
+    '▢',
+    '◯',
+    '⏃',
+    '⏀',
+    '⏆'
   ]
 };
 
index d095e47e4c74e168dc1bc2fd1cb50bdf07d42ce5..f09e8dd1c0fbf47f14b9f8e87177af590d781794 100644 (file)
@@ -85,4 +85,4 @@ export default class Forum {
     console.log(' ^+---------+');
     console.log('      (.) ');
   }
-};
+}
index bd75030d3457ef96d1714edda9acf99872c2cc87..704c540ed2090a35c8860ac9857f4a67c9072b17 100644 (file)
@@ -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",