···11-module.exports = {
22- // https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy
33- // This option interrupts the configuration hierarchy at this file
44- // Remove this if you have an higher level ESLint config file (it usually happens into a monorepos)
55- root: true,
66-77- // https://eslint.vuejs.org/user-guide/#how-to-use-a-custom-parser
88- // Must use parserOptions instead of "parser" to allow vue-eslint-parser to keep working
99- // `parser: 'vue-eslint-parser'` is already included with any 'plugin:vue/**' config and should be omitted
1010- parserOptions: {
1111- parser: require.resolve('@typescript-eslint/parser'),
1212- extraFileExtensions: [ '.vue' ]
1313- },
1414-1515- env: {
1616- browser: true,
1717- es2021: true,
1818- node: true,
1919- 'vue/setup-compiler-macros': true
2020- },
2121-2222- // Rules order is important, please avoid shuffling them
2323- extends: [
2424- // Base ESLint recommended rules
2525- // 'eslint:recommended',
2626-2727- // https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#usage
2828- // ESLint typescript rules
2929- 'plugin:@typescript-eslint/recommended',
3030-3131- // Uncomment any of the lines below to choose desired strictness,
3232- // but leave only one uncommented!
3333- // See https://eslint.vuejs.org/rules/#available-rules
3434- 'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention)
3535- // 'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability)
3636- // 'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)
3737-3838- // https://github.com/prettier/eslint-config-prettier#installation
3939- // usage with Prettier, provided by 'eslint-config-prettier'.
4040- 'prettier'
4141- ],
4242-4343- plugins: [
4444- // required to apply rules which need type information
4545- '@typescript-eslint',
4646-4747- // https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-files
4848- // required to lint *.vue files
4949- 'vue'
5050-5151- // https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674
5252- // Prettier has not been included as plugin to avoid performance impact
5353- // add it as an extension for your IDE
5454-5555- ],
5656-5757- globals: {
5858- ga: 'readonly', // Google Analytics
5959- cordova: 'readonly',
6060- __statics: 'readonly',
6161- __QUASAR_SSR__: 'readonly',
6262- __QUASAR_SSR_SERVER__: 'readonly',
6363- __QUASAR_SSR_CLIENT__: 'readonly',
6464- __QUASAR_SSR_PWA__: 'readonly',
6565- process: 'readonly',
6666- Capacitor: 'readonly',
6767- chrome: 'readonly'
6868- },
6969-7070- // add your custom rules here
7171- rules: {
7272-7373- 'prefer-promise-reject-errors': 'off',
7474-7575- quotes: ['warn', 'single', { avoidEscape: true }],
7676-7777- // this rule, if on, would require explicit return type on the `render` function
7878- '@typescript-eslint/explicit-function-return-type': 'off',
7979-8080- // in plain CommonJS modules, you can't use `import foo = require('foo')` to pass this rule, so it has to be disabled
8181- '@typescript-eslint/no-var-requires': 'off',
8282-8383- // The core 'no-unused-vars' rules (in the eslint:recommended ruleset)
8484- // does not work with type definitions
8585- 'no-unused-vars': 'off',
8686-8787- // allow debugger during development only
8888- 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
8989- }
9090-}
-4
.gitignore
···1717/src-capacitor/www
1818/src-capacitor/node_modules
19192020-# BEX related directories and files
2121-/src-bex/www
2222-/src-bex/js/core
2323-2420# Log files
2521npm-debug.log*
2622yarn-debug.log*
···11+import { defineBoot } from '#q-app/wrappers'
22+import axios, { type AxiosInstance } from 'axios'
33+44+declare module 'vue' {
55+ interface ComponentCustomProperties {
66+ $axios: AxiosInstance
77+ $api: AxiosInstance
88+ }
99+}
1010+1111+// Be careful when using SSR for cross-request state pollution
1212+// due to creating a Singleton instance here;
1313+// If any client changes this (global) instance, it might be a
1414+// good idea to move this instance creation inside of the
1515+// "export default () => {}" function below (which runs individually
1616+// for each client)
1717+const api = axios.create({ baseURL: 'https://api.example.com' })
1818+1919+export default defineBoot(({ app }) => {
2020+ // for use inside Vue files (Options API) through this.$axios and this.$api
2121+2222+ app.config.globalProperties.$axios = axios
2323+ // ^ ^ ^ this will allow you to use this.$axios (for Vue Options API form)
2424+ // so you won't necessarily have to import axios in each vue file
2525+2626+ app.config.globalProperties.$api = api
2727+ // ^ ^ ^ this will allow you to use this.$api (for Vue Options API form)
2828+ // so you can easily perform requests against your app's API
2929+})
3030+3131+export { api }
···11+export interface Todo {
22+ id: number
33+ content: string
44+}
55+66+export interface Meta {
77+ totalCount: number
88+}
+1-1
src/css/quasar.variables.scss
···1212// to match your app's branding.
1313// Tip: Use the "Theme Builder" on Quasar's documentation website.
14141515-$primary: #1976d2;
1515+$primary: #27a69a;
1616$secondary: #26a69a;
1717$accent: #9c27b0;
1818
···11-/* eslint-disable */
22-33-// Forces TS to apply `@quasar/app-vite` augmentations of `quasar` package
44-// Removing this would break `quasar/wrappers` imports as those typings are declared
55-// into `@quasar/app-vite`
66-// As a side effect, since `@quasar/app-vite` reference `quasar` to augment it,
77-// this declaration also apply `quasar` own
88-// augmentations (eg. adds `$q` into Vue component context)
99-/// <reference types="@quasar/app-vite" />
+8-9
src/router/index.ts
···11-import { route } from 'quasar/wrappers';
11+import { defineRouter } from '#q-app/wrappers'
22import {
33 createMemoryHistory,
44 createRouter,
55 createWebHashHistory,
66 createWebHistory,
77-} from 'vue-router';
88-99-import routes from './routes';
77+} from 'vue-router'
88+import routes from './routes'
1091110/*
1211 * If not building with SSR mode, you can
···1716 * with the Router instance.
1817 */
19182020-export default route(function (/* { store, ssrContext } */) {
1919+export default defineRouter(function (/* { store, ssrContext } */) {
2120 const createHistory = process.env.SERVER
2221 ? createMemoryHistory
2322 : process.env.VUE_ROUTER_MODE === 'history'
2423 ? createWebHistory
2525- : createWebHashHistory;
2424+ : createWebHashHistory
26252726 const Router = createRouter({
2827 scrollBehavior: () => ({ left: 0, top: 0 }),
···3231 // quasar.conf.js -> build -> vueRouterMode
3332 // quasar.conf.js -> build -> publicPath
3433 history: createHistory(process.env.VUE_ROUTER_BASE),
3535- });
3434+ })
36353737- return Router;
3838-});
3636+ return Router
3737+})
···11+import { defineStore } from '#q-app/wrappers'
22+import { createPinia } from 'pinia'
33+44+/*
55+ * When adding new properties to stores, you should also
66+ * extend the `PiniaCustomProperties` interface.
77+ * @see https://pinia.vuejs.org/core-concepts/plugins.html#typing-new-store-properties
88+ */
99+declare module 'pinia' {
1010+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1111+ export interface PiniaCustomProperties {
1212+ // add your custom properties here, if any
1313+ }
1414+}
1515+1616+/*
1717+ * If not building with SSR mode, you can
1818+ * directly export the Store instantiation;
1919+ *
2020+ * The function below can be async too; either use
2121+ * async/await or return a Promise which resolves
2222+ * with the Store instance.
2323+ */
2424+2525+export default defineStore((/* { ssrContext } */) => {
2626+ const pinia = createPinia()
2727+2828+ // You can add Pinia plugins here
2929+ // pinia.use(SomePiniaPlugin)
3030+3131+ return pinia
3232+})