aboutsummaryrefslogtreecommitdiff
path: root/viewer
diff options
context:
space:
mode:
Diffstat (limited to 'viewer')
-rw-r--r--viewer/.eslintrc.js37
-rw-r--r--viewer/tsconfig.json2
-rw-r--r--viewer/visualstudio.code-workspace34
-rw-r--r--viewer/vue.config.js6
4 files changed, 43 insertions, 36 deletions
diff --git a/viewer/.eslintrc.js b/viewer/.eslintrc.js
index e1ad89b..113ff6a 100644
--- a/viewer/.eslintrc.js
+++ b/viewer/.eslintrc.js
@@ -6,30 +6,35 @@ module.exports = {
6 }, 6 },
7 7
8 extends: [ 8 extends: [
9 'plugin:vue/essential', 9 "plugin:vue/essential",
10 '@vue/typescript' 10 "@vue/typescript"
11 ], 11 ],
12 12
13 rules: { 13 rules: {
14 "no-console": "off", 14 "no-console": "off",
15 "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off", 15 "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
16 'eol-last': ['warn', 'always'], 16 "eol-last": ["warn", "always"],
17 'vue/attribute-hyphenation': 'warn', 17 "object-curly-spacing": ["warn", "always"],
18 'vue/html-closing-bracket-spacing': 'warn', 18 "indent": ["warn", 2, { "SwitchCase": 1 }],
19 'vue/html-end-tags': 'error', 19 "quote-props": ["warn", "as-needed"],
20 'vue/html-quotes': 'warn', 20 "quotes": ["warn", "double"],
21 'vue/html-self-closing': 'off', 21 "vue/attribute-hyphenation": "warn",
22 'vue/no-multi-spaces': 'warn', 22 "vue/html-closing-bracket-spacing": "warn",
23 'vue/no-spaces-around-equal-signs-in-attribute': 'warn', 23 "vue/html-end-tags": "error",
24 'vue/no-template-shadow': 'error', 24 "vue/html-quotes": "warn",
25 'vue/v-bind-style': 'warn', 25 "vue/html-self-closing": "off",
26 'vue/v-on-style': 'warn', 26 "vue/no-multi-spaces": "warn",
27 'vue/attributes-order': 'warn', 27 "vue/no-spaces-around-equal-signs-in-attribute": "warn",
28 'vue/this-in-template': 'warn', 28 "vue/no-template-shadow": "error",
29 "vue/v-bind-style": "warn",
30 "vue/v-on-style": "warn",
31 "vue/attributes-order": "warn",
32 "vue/this-in-template": "warn",
29 }, 33 },
30 34
31 parserOptions: { 35 parserOptions: {
32 parser: '@typescript-eslint/parser', 36 sourceType: "module",
37 parser: "@typescript-eslint/parser",
33 }, 38 },
34 39
35}; 40};
diff --git a/viewer/tsconfig.json b/viewer/tsconfig.json
index 38e14fa..02d9d7f 100644
--- a/viewer/tsconfig.json
+++ b/viewer/tsconfig.json
@@ -38,4 +38,4 @@
38 "exclude": [ 38 "exclude": [
39 "node_modules" 39 "node_modules"
40 ] 40 ]
41} \ No newline at end of file 41}
diff --git a/viewer/visualstudio.code-workspace b/viewer/visualstudio.code-workspace
index 8c1079e..8315cbb 100644
--- a/viewer/visualstudio.code-workspace
+++ b/viewer/visualstudio.code-workspace
@@ -1,20 +1,22 @@
1{ 1{
2 "folders": [ 2 "folders": [
3 { 3 {
4 "path": "." 4 "path": "."
5 } 5 }
6 ], 6 ],
7 "settings": { 7 "settings": {
8 "editor.formatOnSave": true, 8 "editor.tabSize": 2,
9 "editor.wordBasedSuggestions": false, 9 "editor.formatOnSave": true,
10 "files.insertFinalNewline": true, 10 "editor.wordBasedSuggestions": false,
11 "files.trimFinalNewlines": true, 11 "editor.detectIndentation": false,
12 "javascript.format.semicolons": "insert", 12 "files.insertFinalNewline": true,
13 "typescript.disableAutomaticTypeAcquisition": true, 13 "files.trimFinalNewlines": true,
14 "vue-i18n-ally.keystyle": "flat", 14 "javascript.format.semicolons": "insert",
15 "vue-i18n-ally.localesPaths": "src/locales", 15 "typescript.disableAutomaticTypeAcquisition": true,
16 "i18n-ally.localesPaths": "src/locales", 16 "vue-i18n-ally.keystyle": "flat",
17 } 17 "vue-i18n-ally.localesPaths": "src/locales",
18 "i18n-ally.localesPaths": "src/locales",
19 },
18} 20}
19// Recommended Visual Studio Code extensions: 21// Recommended Visual Studio Code extensions:
20// - Vetur 22// - Vetur
diff --git a/viewer/vue.config.js b/viewer/vue.config.js
index 9b92dc2..f481e4f 100644
--- a/viewer/vue.config.js
+++ b/viewer/vue.config.js
@@ -28,10 +28,10 @@ module.exports = {
28 }, 28 },
29 }, 29 },
30 chainWebpack: (config) => { 30 chainWebpack: (config) => {
31 config.plugins.delete('prefetch'); 31 config.plugins.delete("prefetch");
32 }, 32 },
33 configureWebpack: { 33 configureWebpack: {
34 devtool: 'source-map' 34 devtool: "source-map"
35 }, 35 },
36 productionSourceMap: false, 36 productionSourceMap: false,
37 devServer: { 37 devServer: {
@@ -41,7 +41,7 @@ module.exports = {
41 app.get(`/${process.env.VUE_APP_DATA_URL}*`, (req, res) => { 41 app.get(`/${process.env.VUE_APP_DATA_URL}*`, (req, res) => {
42 const fs = require("fs"); 42 const fs = require("fs");
43 const url = req.url.slice(process.env.VUE_APP_DATA_URL.length); 43 const url = req.url.slice(process.env.VUE_APP_DATA_URL.length);
44 const paramIdx = url.indexOf('?'); 44 const paramIdx = url.indexOf("?");
45 const filepath = paramIdx < 0 ? url : url.substring(0, paramIdx); 45 const filepath = paramIdx < 0 ? url : url.substring(0, paramIdx);
46 const fullpath = `${process.env.VUE_APP_DEVSERVER_CONFIG_PATH}${decodeURIComponent(filepath)}`; 46 const fullpath = `${process.env.VUE_APP_DEVSERVER_CONFIG_PATH}${decodeURIComponent(filepath)}`;
47 const file = fs.readFileSync(fullpath); 47 const file = fs.readFileSync(fullpath);