From 968a79b56c68770e30c68efa3cc9de3a5e41d78b Mon Sep 17 00:00:00 2001 From: qazal <77887910+Qazalin@users.noreply.github.com> Date: Mon, 14 Oct 2024 22:40:56 +0300 Subject: [PATCH] lint viz with eslint (#6988) * lint viz * green * move config * space * meh, laterg --- eslint.config.mjs | 9 ++++++ tinygrad/viz/eslint.config.mjs | 9 ++++++ tinygrad/viz/index.html | 59 ++++++++++++++-------------------- 3 files changed, 43 insertions(+), 34 deletions(-) create mode 100644 eslint.config.mjs create mode 100644 tinygrad/viz/eslint.config.mjs diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 00000000..03c4ab47 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,9 @@ +import globals from "globals"; +import pluginJs from "@eslint/js"; +import pluginHtml from "eslint-plugin-html"; + +export default [ + {files: ["**/*.html"], plugins: {html: pluginHtml}, rules:{"max-len": ["error", {"code": 150}]}}, + {languageOptions: {globals: globals.browser}}, + pluginJs.configs.recommended, +]; diff --git a/tinygrad/viz/eslint.config.mjs b/tinygrad/viz/eslint.config.mjs new file mode 100644 index 00000000..d95bcaf6 --- /dev/null +++ b/tinygrad/viz/eslint.config.mjs @@ -0,0 +1,9 @@ +import globals from "globals"; +import pluginJs from "@eslint/js"; +import pluginHtml from "eslint-plugin-html"; + +export default [ + {files: ["**/*.html"], plugins: {html: pluginHtml}, rules: {"max-len": ["error", {"code": 150}]}}, + {languageOptions: {globals: globals.browser}}, + pluginJs.configs.recommended, +]; diff --git a/tinygrad/viz/index.html b/tinygrad/viz/index.html index 657e3bc1..6d7f8c1d 100644 --- a/tinygrad/viz/index.html +++ b/tinygrad/viz/index.html @@ -59,6 +59,8 @@ .node rect { stroke: #4a4b57; stroke-width: 1.5px; + rx: 8px; + ry: 8px; } .label text { color: #08090e; @@ -137,26 +139,6 @@ border-radius: 8px; padding: 8px; } - .spinner { - position: absolute; - left: 50%; - top: 50%; - width: 32px; - height: 32px; - border: 4px solid #B4B4B4; - border-bottom-color: transparent; - border-radius: 50%; - display: inline-block; - animation: spin 1s linear infinite; - } - @keyframes spin { - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(360deg); - } - } @@ -170,6 +152,7 @@