From 0bbaeb179fd6c074a9b5799f2ceba8e72460dd7f Mon Sep 17 00:00:00 2001
From: Alexander Rind <1217527+alex-rind@users.noreply.github.com>
Date: Tue, 6 Aug 2024 10:03:45 +0200
Subject: [PATCH 1/4] upgrade vue and typescript, use vite instead of webpack,
fix most errors
---
.browserslistrc | 4 -
.eslintrc.cjs | 15 +
.eslintrc.js | 20 -
.gitignore | 24 +-
.prettierrc.json | 8 +
.vscode/extensions.json | 7 +
babel.config.js | 3 -
env.d.ts | 3 +
public/index.html => index.html | 5 +-
package-lock.json | 26286 ++++-------------
package.json | 55 +-
{public => src/assets}/fhstp_sw_pos.png | Bin
src/assets/main.scss | 28 +-
src/components/AlteriEditForm.vue | 4 +-
src/components/AlteriPanelEntry.vue | 4 +-
src/components/ComparisonOptionsPanel.vue | 2 +-
src/components/ComparisonSlider.vue | 4 +-
src/components/EgoEditForm.vue | 2 +-
src/components/NetworkMap.vue | 6 +-
src/components/NetworkMapCoordinates.vue | 2 +-
src/components/NetworkMapSectors.vue | 2 +-
src/components/SideMenu.vue | 6 +-
src/components/StatisticsTable.vue | 2 +-
src/components/StatisticsTableCategories.vue | 2 +-
src/components/ViewOptionsPanel.vue | 2 +-
src/data/AlterCategories.ts | 4 +-
src/data/NWK.ts | 6 +-
src/data/NWKRecord.ts | 2 +-
src/data/NWKVersion.ts | 2 +-
src/data/NetworkAnalysis.ts | 8 +-
src/data/statisticsCSV.ts | 6 +-
src/main.ts | 2 +-
src/router/index.ts | 2 +-
src/shims-vue.d.ts | 6 -
src/store/adaptiveNWKDefaults.ts | 2 +-
src/store/index.ts | 16 +-
src/store/localStoragePlugin.ts | 6 +-
src/store/nwkModule.ts | 6 +-
src/store/nwkRecordModule.ts | 6 +-
src/store/pseudonymPlugin.ts | 2 +-
src/store/viewSettingsModule.ts | 2 +-
src/vuex.d.ts | 6 +
tsconfig.app.json | 16 +
tsconfig.json | 45 +-
tsconfig.node.json | 19 +
vite.config.ts | 30 +
vue.config.js | 23 -
47 files changed, 5813 insertions(+), 20900 deletions(-)
delete mode 100644 .browserslistrc
create mode 100644 .eslintrc.cjs
delete mode 100644 .eslintrc.js
create mode 100644 .prettierrc.json
create mode 100644 .vscode/extensions.json
delete mode 100644 babel.config.js
create mode 100644 env.d.ts
rename public/index.html => index.html (81%)
rename {public => src/assets}/fhstp_sw_pos.png (100%)
delete mode 100644 src/shims-vue.d.ts
create mode 100644 src/vuex.d.ts
create mode 100644 tsconfig.app.json
create mode 100644 tsconfig.node.json
create mode 100644 vite.config.ts
delete mode 100644 vue.config.js
diff --git a/.browserslistrc b/.browserslistrc
deleted file mode 100644
index dc3bc09..0000000
--- a/.browserslistrc
+++ /dev/null
@@ -1,4 +0,0 @@
-> 1%
-last 2 versions
-not dead
-not ie 11
diff --git a/.eslintrc.cjs b/.eslintrc.cjs
new file mode 100644
index 0000000..e7ab8f6
--- /dev/null
+++ b/.eslintrc.cjs
@@ -0,0 +1,15 @@
+/* eslint-env node */
+require("@rushstack/eslint-patch/modern-module-resolution");
+
+module.exports = {
+ root: true,
+ extends: [
+ "plugin:vue/vue3-essential",
+ "eslint:recommended",
+ "@vue/eslint-config-typescript",
+ "@vue/eslint-config-prettier/skip-formatting",
+ ],
+ parserOptions: {
+ ecmaVersion: "latest",
+ },
+};
diff --git a/.eslintrc.js b/.eslintrc.js
deleted file mode 100644
index 33c4302..0000000
--- a/.eslintrc.js
+++ /dev/null
@@ -1,20 +0,0 @@
-module.exports = {
- root: true,
- env: {
- node: true,
- },
- extends: [
- "plugin:vue/vue3-essential",
- "eslint:recommended",
- "@vue/typescript/recommended",
- "plugin:prettier/recommended",
- ],
- parserOptions: {
- ecmaVersion: 2020,
- },
- rules: {
- "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
- "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
- "prettier/prettier": "warn",
- },
-};
diff --git a/.gitignore b/.gitignore
index 11f5d71..044d33a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,22 +1,34 @@
-.DS_Store
-node_modules
-/dist
-
# local env files
.env.local
.env.*.local
-# Log files
+# Logs
+logs
+*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
+lerna-debug.log*
+
+node_modules
+.DS_Store
+dist
+dist-ssr
+coverage
+*.local
+
+/cypress/videos/
+/cypress/screenshots/
# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
.idea
-.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
+
+*.tsbuildinfo
diff --git a/.prettierrc.json b/.prettierrc.json
new file mode 100644
index 0000000..66e2335
--- /dev/null
+++ b/.prettierrc.json
@@ -0,0 +1,8 @@
+{
+ "$schema": "https://json.schemastore.org/prettierrc",
+ "semi": false,
+ "tabWidth": 2,
+ "singleQuote": true,
+ "printWidth": 100,
+ "trailingComma": "none"
+}
\ No newline at end of file
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 0000000..93ea3e7
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,7 @@
+{
+ "recommendations": [
+ "Vue.volar",
+ "dbaeumer.vscode-eslint",
+ "esbenp.prettier-vscode"
+ ]
+}
diff --git a/babel.config.js b/babel.config.js
deleted file mode 100644
index 162a3ea..0000000
--- a/babel.config.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = {
- presets: ["@vue/cli-plugin-babel/preset"],
-};
diff --git a/env.d.ts b/env.d.ts
new file mode 100644
index 0000000..dbb4c62
--- /dev/null
+++ b/env.d.ts
@@ -0,0 +1,3 @@
+///