diff --git a/.eslintrc.js b/.eslintrc.js index dabf8ae7..dd427155 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -22,8 +22,8 @@ module.exports = { // Uncomment any of the lines below to choose desired strictness, // but leave only one uncommented! // See https://eslint.vuejs.org/rules/#available-rules - 'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention) - // 'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability) + // 'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention) + 'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability) // 'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead) 'standard' @@ -66,7 +66,18 @@ module.exports = { 'prefer-promise-reject-errors': 'off', semi: 'off', // allow debugger during development only - 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' + 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', + 'vue/html-indent': [ + 'error', + 4, + { + attribute: 1, + baseIndent: 1, + closeBracket: 0, + alignAttributesVertically: true, + ignores: [] + } + ] }, overrides: [ { diff --git a/.vscode/settings.json b/.vscode/settings.json index 484a898f..0eda1dfd 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,8 +3,11 @@ "eslint.autoFixOnSave": true, "editor.bracketPairColorization.enabled": true, "editor.guides.bracketPairs": true, - "editor.formatOnSave": true, - "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": false, + "editor.defaultFormatter": null, "editor.codeActionsOnSave": ["source.fixAll.eslint"], - "eslint.validate": ["javascript", "javascriptreact", "typescript", "vue"] + "eslint.validate": ["javascript", "javascriptreact", "typescript", "vue"], + "[sql]": { + "editor.formatOnSave": true + } } diff --git a/quasar.config.js b/quasar.config.js index 378b6e6d..abd52035 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -15,6 +15,12 @@ const { configure } = require('quasar/wrappers'); module.exports = configure(function (ctx) { return { + // fix: true, + // include = [], + // exclude = [], + // rawOptions = {}, + warnings: true, + errors: true, // https://v2.quasar.dev/quasar-cli-webpack/supporting-ts supportTS: false, @@ -102,7 +108,7 @@ module.exports = configure(function (ctx) { proxy: { '/api': 'http://localhost:3000', '/': { - target: 'http://localhost:3002', + target: 'http://localhost:3001', bypass: req => (req.path !== '/' ? req.path : null) } } diff --git a/src/boot/axios.js b/src/boot/axios.js index 66b2ffe9..8902e070 100644 --- a/src/boot/axios.js +++ b/src/boot/axios.js @@ -21,7 +21,7 @@ const onRequestError = error => { }; const onResponseError = error => { - let message = ''; + let message = error.message; const response = error.response; const responseData = response && response.data; @@ -47,6 +47,7 @@ export default boot(({ app }) => { api.interceptors.response.use(response => response, onResponseError); jApi.use(addToken); + jApi.useErrorInterceptor(onResponseError); // for use inside Vue files (Options API) through this.$axios and this.$api diff --git a/src/components/common/VnForm.vue b/src/components/common/VnForm.vue index 418b8022..98a46ac5 100644 --- a/src/components/common/VnForm.vue +++ b/src/components/common/VnForm.vue @@ -179,7 +179,10 @@ defineExpose({ -