diff --git a/.eslintrc.js b/.eslintrc.js index d6e67cb..8d3512d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,31 +1,12 @@ -require('@rushstack/eslint-patch/modern-module-resolution') - module.exports = { - root: true, - env: { - node: true - }, extends: [ - 'plugin:vue/essential', - '@vue/standard', - '@vue/eslint-config-prettier' + // add more generic rulesets here, such as: + // 'eslint:recommended', + // 'plugin:vue/vue3-recommended', + 'plugin:vue/recommended' // Use this if you are using Vue.js 2.x. ], - parserOptions: { - parser: 'babel-eslint' - }, rules: { - 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', - 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off' - }, - overrides: [ - { - files: [ - '**/__tests__/*.{j,t}s?(x)', - '**/tests/unit/**/*.spec.{j,t}s?(x)' - ], - env: { - jest: true - } - } - ] -} + // override/add rules settings here, such as: + // 'vue/no-unused-vars': 'error' + } +} \ No newline at end of file diff --git a/babel.config.js b/babel.config.js index 716b023..26aae74 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,3 +1,11 @@ module.exports = { - presets: ['@vue/cli-plugin-babel/preset'] -} + presets: [ + [ + '@vue/babel-preset-jsx', + { + vModel: false, + compositionAPI: true, + }, + ], + ], +} \ No newline at end of file diff --git a/package.json b/package.json index 3e1417b..8ed4285 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,8 @@ "@openearth/windgl": "^0.1.2", "@turf/distance": "^6.3.0", "@turf/turf": "^6.3.0", - "@vue/composition-api": "^1.0.0-rc.7", + "@vue/babel-helper-vue-jsx-merge-props": "^1.4.0", + "@vue/babel-preset-jsx": "^1.4.0", "core-js": "^3.6.5", "echarts": "^5.4.3", "file-saver": "^2.0.5", @@ -24,7 +25,7 @@ "oidc-client": "^1.11.5", "register-service-worker": "^1.7.1", "tiny-cookie": "^2.3.2", - "vue": "^2.6.11", + "vue": "^2.7.2", "vue-echarts": "^6.6.1", "vue-gtag": "^1.16.1", "vue-router": "^3.2.0", @@ -42,26 +43,27 @@ } }, "devDependencies": { + "@babel/core": "^7.24.7", + "@babel/eslint-parser": "^7.24.7", "@mdi/font": "^5.9.55", "@rushstack/eslint-patch": "^1.4.0", - "@vue/cli-plugin-babel": "~4.5.0", - "@vue/cli-plugin-eslint": "~4.5.0", - "@vue/cli-plugin-pwa": "~4.5.0", - "@vue/cli-plugin-router": "~4.5.0", - "@vue/cli-plugin-unit-jest": "~4.5.0", - "@vue/cli-plugin-vuex": "~4.5.0", - "@vue/cli-service": "~4.5.0", - "@vue/eslint-config-prettier": "^6.0.0", - "@vue/eslint-config-standard": "^5.1.2", + "@vue/cli-plugin-babel": "~5.0.8", + "@vue/cli-plugin-eslint": "~5.0.8", + "@vue/cli-plugin-pwa": "~5.0.8", + "@vue/cli-plugin-router": "~5.0.8", + "@vue/cli-plugin-unit-jest": "~5.0.8", + "@vue/cli-plugin-vuex": "~5.0.8", + "@vue/cli-service": "~5.0.8", + "@vue/eslint-config-prettier": "^8.0.0", + "@vue/eslint-config-standard": "^8.0.1", "@vue/runtime-dom": "^3.3.4", "@vue/test-utils": "^1.0.3", - "babel-eslint": "^10.1.0", - "eslint": "^6.7.2", + "eslint": "^8.57.0", "eslint-plugin-import": "^2.20.2", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.2.1", "eslint-plugin-standard": "^4.0.0", - "eslint-plugin-vue": "^6.2.2", + "eslint-plugin-vue": "^9.26.0", "lint-staged": "^9.5.0", "markdown-loader": "^6.0.0", "sass": "^1.32.0", @@ -69,7 +71,7 @@ "vue-cli-plugin-vuetify": "~2.3.1", "vue-html-loader": "^1.2.4", "vue-svg-loader": "^0.16.0", - "vue-template-compiler": "^2.6.11", + "vue-template-compiler": "~2.7.14", "vuetify-loader": "^1.7.0" }, "gitHooks": { diff --git a/src/components/NewsLayout.vue b/src/components/NewsLayout.vue index 99a7336..4ed9660 100644 --- a/src/components/NewsLayout.vue +++ b/src/components/NewsLayout.vue @@ -1,16 +1,37 @@