From bf1d9de71b3042a0b9be827966d52a0cbe367a56 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Wed, 9 Sep 2026 18:08:56 -0700 Subject: [PATCH 1/2] Add new workflow to do style check --- .github/workflows/style.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/style.yml diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml new file mode 100644 index 0000000..13c2a13 --- /dev/null +++ b/.github/workflows/style.yml @@ -0,0 +1,18 @@ +name: Style + +on: + pull_request: + branches: + - master + +jobs: + style: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: actions/setup-node@v7 + with: + node-version: 26 + cache: npm + - run: make style + - run: git diff --exit-code From 9d0d5668afc550ced3266be3c6b2c4cd67fc8869 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Wed, 9 Sep 2026 18:15:49 -0700 Subject: [PATCH 2/2] Apply make style --- examples/basic.html | 2 +- examples/requirejs.html | 2 +- live/index.html | 12 ++++++------ src/index.js | 10 +++++----- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/examples/basic.html b/examples/basic.html index e6d66e3..d3f43f9 100644 --- a/examples/basic.html +++ b/examples/basic.html @@ -1,4 +1,4 @@ - + diff --git a/examples/requirejs.html b/examples/requirejs.html index 9267402..f46601d 100644 --- a/examples/requirejs.html +++ b/examples/requirejs.html @@ -1,4 +1,4 @@ - + diff --git a/live/index.html b/live/index.html index dbf18a9..9fce71d 100644 --- a/live/index.html +++ b/live/index.html @@ -1,4 +1,4 @@ - + @@ -841,7 +841,7 @@ taps: 2, interval: 1500, posThresholdL: 50, - }) + }), ); mc.on("doubletap", binding.value); } @@ -983,7 +983,7 @@ }); var stream = new URLSearchParams(document.location.search).get( - "stream" + "stream", ); if (stream) { console.log(`loading stream from ${stream}`); @@ -1001,7 +1001,7 @@ } var experimental = new URLSearchParams(document.location.search).get( - "experimental" + "experimental", ); if (experimental) { this.experimentalMode = true; @@ -1034,7 +1034,7 @@ event.keyCode, event.ctrlKey, event.shiftKey, - event.altKey + event.altKey, ); } }); @@ -1050,7 +1050,7 @@ event.keyCode + offset, event.ctrlKey, event.shiftKey, - event.altKey + event.altKey, ); } }); diff --git a/src/index.js b/src/index.js index a4a8554..d2a8b50 100644 --- a/src/index.js +++ b/src/index.js @@ -37,7 +37,7 @@ window.crypto.getRandomValues(arr); return arr.reduce( (cur, next) => cur + next.toString(36).padStart(2, "0"), - "" + "", ); } @@ -69,7 +69,7 @@ `style.width=${this.canvas_.style.width}, ` + `style.height=${this.canvas_.style.height}, ` + `width=${this.canvas_.width}, ` + - `height=${this.canvas_.height}` + `height=${this.canvas_.height}`, ); } @@ -158,7 +158,7 @@ data, false, this.logical_width_, - this.logical_height_ + this.logical_height_, ); this.new_stream_callbacks.forEach((f) => f(this)); @@ -216,7 +216,7 @@ async loadStream(e) { const file = e.target.files[0]; const data = await new Response(file).text(); - const extension = file.name.split('.').pop(); + const extension = file.name.split(".").pop(); if (["mesh", "vtk", "msh"].includes(extension)) { await this.display("mesh\n" + data); } else { @@ -267,7 +267,7 @@ return btoa( data.reduce(function (data, byte) { return data + String.fromCharCode(byte); - }, "") + }, ""), ); }