Repos / pytaku / 46714b5c94
commit 46714b5c94aab4660ebedff9769f55b0f826c57a
Author: Bùi Thành Nhân <hi@imnhan.com>
Date: Mon Aug 24 18:16:05 2020 +0700
jshint strict mode
diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 0000000..edc02dc
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1 @@
+src/pytaku/static/vendored
diff --git a/.jshintrc b/.jshintrc
index 871f29f..d46f595 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -1,4 +1,10 @@
{
"laxbreak": true,
- "esversion": 6
+ "esversion": 6,
+ "strict": "implied",
+ "browser": true,
+ "globals": {
+ "m": true,
+ "console": true
+ }
}
diff --git a/pyproject.toml b/pyproject.toml
index df8f397..5e59ea2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pytaku"
-version = "0.3.2"
+version = "0.3.3"
description = ""
authors = ["Bùi Thành Nhân <hi@imnhan.com>"]
license = "AGPL-3.0-only"
diff --git a/src/pytaku/static/js/routes/follows.js b/src/pytaku/static/js/routes/follows.js
index 04e2ad4..b603aed 100644
--- a/src/pytaku/static/js/routes/follows.js
+++ b/src/pytaku/static/js/routes/follows.js
@@ -51,7 +51,6 @@ function Follows(initialVNode) {
titles = resp.titles;
})
.catch((err) => {
- alert("TODO");
console.log(err);
})
.finally(() => {
diff --git a/src/pytaku/static/js/utils.js b/src/pytaku/static/js/utils.js
index d8f1f12..dd428a2 100644
--- a/src/pytaku/static/js/utils.js
+++ b/src/pytaku/static/js/utils.js
@@ -6,10 +6,7 @@ const Button = {
view: (vnode) =>
m(
"button",
- {
- class: vnode.attrs.color || "",
- ...vnode.attrs,
- },
+ Object.assign({ class: vnode.attrs.color || "" }, vnode.attrs),
[
vnode.attrs.icon ? m(`i.icon.icon-${vnode.attrs.icon}`) : null,
vnode.attrs.text ? m("span", vnode.attrs.text) : null,
@@ -33,7 +30,6 @@ const Chapter = {
),
]
),
- ,
]),
};