[cleanup] Fix some warnings of the vue eslint plugin

This commit is contained in:
Ferdinand Thiessen 2021-11-11 11:52:20 +01:00
parent dfb924bb3f
commit 73f50e9f4f
7 changed files with 21 additions and 12 deletions

View File

@ -76,13 +76,20 @@ module.exports = {
// add your custom rules here
rules: {
// 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}],
// TypeScript
quotes: ['warn', 'single', { avoidEscape: true }],
// Allow " if ' is contained inside the string, so we can avoid escaping
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-module-boundary-types': 'off',

View File

@ -16,7 +16,7 @@ import { hasPermissions } from '@flaschengeist/api';
import { FG_Plugin } from '@flaschengeist/types';
export default defineComponent({
name: 'Dashboard',
name: 'PageDashboard',
setup() {
const flaschengeist = inject<FG_Plugin.Flaschengeist>('flaschengeist');
const widgets = computed(() => {

View File

@ -77,7 +77,7 @@ import { setBaseURL, api } from 'boot/axios';
import { useQuasar } from 'quasar';
export default defineComponent({
name: 'Login',
name: 'PageLogin',
components: { PasswordInput },
setup() {
const mainStore = useMainStore();
@ -145,7 +145,8 @@ export default defineComponent({
Notify.create({
group: false,
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,
progress: true,
actions: [{ icon: 'mdi-close', color: 'white' }],

View File

@ -39,14 +39,15 @@ import { defineComponent, ref, onUnmounted } from 'vue';
import { useRouter } from 'vue-router';
export default defineComponent({
name: 'Offline',
name: 'PageOffline',
setup() {
const router = useRouter();
const reload = ref(10);
const ival = setInterval(() => {
reload.value -= 1;
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;
void router.replace(path ? { path: <string>path } : { name: 'login' });
}

View File

@ -38,7 +38,7 @@
import { defineComponent } from 'vue';
export default defineComponent({
name: 'PluginError',
name: 'PagePluginError',
});
</script>

View File

@ -40,7 +40,7 @@ import { Loading, Notify } from 'quasar';
import { defineComponent, ref } from 'vue';
export default defineComponent({
// name: 'PageName'
name: 'PageReset',
setup() {
const mainStore = useMainStore();
const router = useRouter();

View File

@ -92,7 +92,7 @@ const developers = [
},
];
export default defineComponent({
name: 'About',
name: 'PageAbout',
components: { Developer },
setup() {
const plugins = inject<FG_Plugin.Flaschengeist>('flaschengeist')?.plugins || [];