Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@
*.pyd
*.pyc
**/__pycache__/
**/node_modules/
/refl1d/webview/client/dist/
*.swp
*.so
*.bak
refl1d-webview-client*.tgz
bumps-webview-client*.tgz
/build/
/dist/
/refl1d.egg-info/
Expand Down Expand Up @@ -61,8 +57,6 @@ venv.bak/
*.swp
*.bak

test-files/

# Unused lock files
bun.lock
uv.lock
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
repos:
- repo: local
hooks:
- id: eslint
name: eslint
entry: bash -c "cd refl1d/webview/client && npm run lint"
- id: frontend-lint
name: frontend-lint
entry: bash -c "cd refl1d/webview/client && npm run lint || bun run lint || exit 1"
language: system
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
Expand All @@ -24,4 +24,4 @@ repos:

ci:
autoupdate_schedule: monthly
skip: [eslint]
skip: [frontend-lint]
5 changes: 5 additions & 0 deletions refl1d/webview/client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bumps-webview-client*.tgz
refl1d-webview-client*.tgz
bun.lock
dist/
node_modules/
39 changes: 39 additions & 0 deletions refl1d/webview/client/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false,
"includes": ["**", "!**/*.css", "!**/*.scss"]
},
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 120,
"attributePosition": "auto",
"bracketSameLine": false,
"bracketSpacing": true,
"expand": "auto",
"useEditorconfig": true
},
"linter": {
"enabled": true,
"domains": {
"vue": "recommended"
},
"rules": {
"recommended": true
}
},
"html": { "formatter": { "selfCloseVoidElements": "always" } },
"assist": {
"enabled": true,
"actions": { "source": { "organizeImports": "on" } }
}
}
59 changes: 0 additions & 59 deletions refl1d/webview/client/eslint.config.js

This file was deleted.

45 changes: 17 additions & 28 deletions refl1d/webview/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "refl1d-webview-client",
"version": "0.1.26",
"version": "0.1.27",
"type": "module",
"repository": {
"type": "git",
Expand All @@ -12,44 +12,33 @@
"build": "vite build --emptyOutDir -m development",
"build_prod": "vite build --emptyOutDir -m production",
"preview": "vite preview --port 4173",
"format": "prettier --write src",
"lint": "eslint src --fix",
"test:lint": "eslint src",
"lint": "biome check src --fix",
"test:lint": "biome check src",
"test:types": "vue-tsc --noEmit --skipLibCheck -p tsconfig.json --composite false"
},
"dependencies": {
"@msgpack/msgpack": "^3.1.2",
"bootstrap": "^5.3.7",
"bootstrap": "^5.3.8",
"date-fns": "^4.1.0",
"json-difference": "^1.16.1",
"mpld3": "^0.5.10",
"plotly.js": "^3.0.1",
"mpld3": "^0.5.11",
"plotly.js": "^3.1.2",
"socket.io-client": "^4.8.1",
"uuid": "^11.1.0",
"vue": "^3.5.17",
"vue-json-pretty": "^2.5.0"
"vue": "^3.5.22",
"vue-json-pretty": "^2.6.0"
},
"devDependencies": {
"@ianvs/prettier-plugin-sort-imports": "^4.4.1",
"@tsconfig/node-lts": "^22.0.2",
"@types/node": "^24.5.2",
"@types/plotly.js": "^2.35.1",
"@types/uuid": "^10.0.0",
"@vitejs/plugin-vue": "^5.2.1",
"@vue/eslint-config-prettier": "10.1.0",
"@vue/eslint-config-typescript": "^14.2.0",
"@vue/tsconfig": "^0.7.0",
"eslint": "^9.18.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-vue": "^9.32.0",
"eslint-plugin-vuejs-accessibility": "^2.4.1",
"prettier": "^3.4.2",
"prettier-plugin-css-order": "^2.1.2",
"prettier-plugin-jsdoc": "^1.3.2",
"typescript": "^5.7.3",
"vite": "^6.0.7",
"@types/node": "^24.9.2",
"@types/plotly.js": "^3.0.8",
"@types/uuid": "^11.0.0",
"@vitejs/plugin-vue": "^6.0.1",
"@vue/tsconfig": "^0.8.1",
"@biomejs/biome": "^2.3.2",
"typescript": "^5.9.3",
"vite": "^7.1.12",
"vite-svg-loader": "5.1.0",
"vue-tsc": "^2.2.0"
"vue-tsc": "^3.1.2"
}
}
48 changes: 0 additions & 48 deletions refl1d/webview/client/prettier.config.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,7 @@ async function disableAutoAlign() {
:disabled="autoAlign"
@change="fetch_and_draw()"
/>
<!-- eslint-disable
vuejs-accessibility/no-static-element-interactions,
vuejs-accessibility/click-events-have-key-events
-->
<span v-if="autoAlign" class="position-absolute top-0 start-0 w-100 h-100" @click="disableAutoAlign"></span>
<!-- eslint-enable
vuejs-accessibility/no-static-element-interactions,
vuejs-accessibility/click-events-have-key-events
-->
</div>
<div class="col-md-3 align-middle">
<label class="form-label" for="n-shown">Sample size</label>
Expand Down
9 changes: 5 additions & 4 deletions refl1d/webview/client/src/panels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ function replace_panel(
panels: Panel[],
replacement_panels: Panel[],
replaced_title: string,
replacement_title: string
replacement_title: string,
) {
const index = panels.findIndex((p) => p.title === replaced_title);
const replacement_index = replacement_panels.findIndex((p) => p.title === replacement_title);
if (index >= 0 && replacement_index >= 0) {
if (replacement_panels[replacement_index] !== undefined) {
panels.splice(index, 1, replacement_panels[replacement_index]);
}
}
Expand All @@ -46,8 +46,9 @@ function insert_panel(panels: Panel[], insertion_panels: Panel[], title: string,
index = panels.length - 1;
}
const insertion_index = insertion_panels.findIndex((p) => p.title === title);
if (insertion_index >= 0) {
panels.splice(index + 1, 0, insertion_panels[insertion_index]);
const panel_to_insert = insertion_panels[insertion_index];
if (panel_to_insert !== undefined) {
panels.splice(index + 1, 0, panel_to_insert);
}
}

Expand Down
6 changes: 6 additions & 0 deletions refl1d/webview/client/src/types.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
/// <reference types="bumps-webview-client/src/types/mpld3" />

declare module "*.vue" {
import type { DefineComponent } from "vue";
const component: DefineComponent<object, object, unknown>;
export default component;
}
2 changes: 1 addition & 1 deletion refl1d/webview/client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"include": ["src/**/*"],
"exclude": [
"node_modules/",
"bumps/**/*",
"**/bumps/**/*",
"src/components/ModelViewPlotly.vue",
],
"compilerOptions": {
Expand Down
Loading