[cleanup] Fix some warnings of the vue eslint plugin
This commit is contained in:
		
							parent
							
								
									dfb924bb3f
								
							
						
					
					
						commit
						73f50e9f4f
					
				
							
								
								
									
										15
									
								
								.eslintrc.js
								
								
								
								
							
							
						
						
									
										15
									
								
								.eslintrc.js
								
								
								
								
							|  | @ -76,13 +76,20 @@ module.exports = { | ||||||
|   // add your custom rules here
 |   // add your custom rules here
 | ||||||
|   rules: { |   rules: { | ||||||
|     // VueStuff
 |     // VueStuff
 | ||||||
|     'vue/multi-word-component-names': 'off', |     // Defaults to error on eslint-plugin-vue 8.0.3, but let us be not too strict with names
 | ||||||
|  |     'vue/multi-word-component-names': 'warn', | ||||||
| 
 | 
 | ||||||
|     // Misc
 |     // Rejects on promises should always be of the Error type (and allow empty rejects as well)
 | ||||||
|     'prefer-promise-reject-errors': ["error", {"allowEmptyReject": true}], |     'prefer-promise-reject-errors': ["error", {"allowEmptyReject": true}], | ||||||
| 
 | 
 | ||||||
|     // TypeScript
 |     // Allow " if ' is contained inside the string, so we can avoid escaping 
 | ||||||
|     quotes: ['warn', 'single', { avoidEscape: true }], |     quotes: [ | ||||||
|  |       process.env.NODE_ENV === 'production' ? 'error' : 'warn', | ||||||
|  |       'single', | ||||||
|  |       { avoidEscape: true } | ||||||
|  |     ], | ||||||
|  |    | ||||||
|  |     // TypeScript, let us be not too strict
 | ||||||
|     '@typescript-eslint/explicit-function-return-type': 'off', |     '@typescript-eslint/explicit-function-return-type': 'off', | ||||||
|     '@typescript-eslint/explicit-module-boundary-types': 'off', |     '@typescript-eslint/explicit-module-boundary-types': 'off', | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -16,7 +16,7 @@ import { hasPermissions } from '@flaschengeist/api'; | ||||||
| import { FG_Plugin } from '@flaschengeist/types'; | import { FG_Plugin } from '@flaschengeist/types'; | ||||||
| 
 | 
 | ||||||
| export default defineComponent({ | export default defineComponent({ | ||||||
|   name: 'Dashboard', |   name: 'PageDashboard', | ||||||
|   setup() { |   setup() { | ||||||
|     const flaschengeist = inject<FG_Plugin.Flaschengeist>('flaschengeist'); |     const flaschengeist = inject<FG_Plugin.Flaschengeist>('flaschengeist'); | ||||||
|     const widgets = computed(() => { |     const widgets = computed(() => { | ||||||
|  |  | ||||||
|  | @ -77,7 +77,7 @@ import { setBaseURL, api } from 'boot/axios'; | ||||||
| import { useQuasar } from 'quasar'; | import { useQuasar } from 'quasar'; | ||||||
| 
 | 
 | ||||||
| export default defineComponent({ | export default defineComponent({ | ||||||
|   name: 'Login', |   name: 'PageLogin', | ||||||
|   components: { PasswordInput }, |   components: { PasswordInput }, | ||||||
|   setup() { |   setup() { | ||||||
|     const mainStore = useMainStore(); |     const mainStore = useMainStore(); | ||||||
|  | @ -145,7 +145,8 @@ export default defineComponent({ | ||||||
|         Notify.create({ |         Notify.create({ | ||||||
|           group: false, |           group: false, | ||||||
|           type: 'ongoing', |           type: 'ongoing', | ||||||
|           message: 'Sollte der Benutzername korrekt und vorhanden sein, erhälst du jetzt eine E-Mail.', |           message: | ||||||
|  |             'Sollte der Benutzername korrekt und vorhanden sein, erhälst du jetzt eine E-Mail.', | ||||||
|           timeout: 10000, |           timeout: 10000, | ||||||
|           progress: true, |           progress: true, | ||||||
|           actions: [{ icon: 'mdi-close', color: 'white' }], |           actions: [{ icon: 'mdi-close', color: 'white' }], | ||||||
|  |  | ||||||
|  | @ -39,14 +39,15 @@ import { defineComponent, ref, onUnmounted } from 'vue'; | ||||||
| import { useRouter } from 'vue-router'; | import { useRouter } from 'vue-router'; | ||||||
| 
 | 
 | ||||||
| export default defineComponent({ | export default defineComponent({ | ||||||
|   name: 'Offline', |   name: 'PageOffline', | ||||||
|   setup() { |   setup() { | ||||||
|     const router = useRouter(); |     const router = useRouter(); | ||||||
|     const reload = ref(10); |     const reload = ref(10); | ||||||
|     const ival = setInterval(() => { |     const ival = setInterval(() => { | ||||||
|       reload.value -= 1; |       reload.value -= 1; | ||||||
|       if (reload.value <= 0) { |       if (reload.value <= 0) { | ||||||
|         if (router.currentRoute.value.params && 'refresh' in router.currentRoute.value.params) router.go(0); |         if (router.currentRoute.value.params && 'refresh' in router.currentRoute.value.params) | ||||||
|  |           router.go(0); | ||||||
|         const path = router.currentRoute.value.query.redirect; |         const path = router.currentRoute.value.query.redirect; | ||||||
|         void router.replace(path ? { path: <string>path } : { name: 'login' }); |         void router.replace(path ? { path: <string>path } : { name: 'login' }); | ||||||
|       } |       } | ||||||
|  |  | ||||||
|  | @ -38,7 +38,7 @@ | ||||||
| import { defineComponent } from 'vue'; | import { defineComponent } from 'vue'; | ||||||
| 
 | 
 | ||||||
| export default defineComponent({ | export default defineComponent({ | ||||||
|   name: 'PluginError', |   name: 'PagePluginError', | ||||||
| }); | }); | ||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -40,7 +40,7 @@ import { Loading, Notify } from 'quasar'; | ||||||
| import { defineComponent, ref } from 'vue'; | import { defineComponent, ref } from 'vue'; | ||||||
| 
 | 
 | ||||||
| export default defineComponent({ | export default defineComponent({ | ||||||
|   // name: 'PageName' |   name: 'PageReset', | ||||||
|   setup() { |   setup() { | ||||||
|     const mainStore = useMainStore(); |     const mainStore = useMainStore(); | ||||||
|     const router = useRouter(); |     const router = useRouter(); | ||||||
|  |  | ||||||
|  | @ -92,7 +92,7 @@ const developers = [ | ||||||
|   }, |   }, | ||||||
| ]; | ]; | ||||||
| export default defineComponent({ | export default defineComponent({ | ||||||
|   name: 'About', |   name: 'PageAbout', | ||||||
|   components: { Developer }, |   components: { Developer }, | ||||||
|   setup() { |   setup() { | ||||||
|     const plugins = inject<FG_Plugin.Flaschengeist>('flaschengeist')?.plugins || []; |     const plugins = inject<FG_Plugin.Flaschengeist>('flaschengeist')?.plugins || []; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue