Fix stupid lint rule
This commit is contained in:
parent
3018bf2ee2
commit
f4951ac18b
11 changed files with 48 additions and 47 deletions
|
@ -1,6 +1,6 @@
|
||||||
import pluginVue from 'eslint-plugin-vue'
|
import pluginVue from 'eslint-plugin-vue';
|
||||||
import {defineConfigWithVueTs, vueTsConfigs} from '@vue/eslint-config-typescript'
|
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript';
|
||||||
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
|
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting';
|
||||||
|
|
||||||
export default defineConfigWithVueTs(
|
export default defineConfigWithVueTs(
|
||||||
{
|
{
|
||||||
|
@ -19,6 +19,7 @@ export default defineConfigWithVueTs(
|
||||||
rules: {
|
rules: {
|
||||||
'@typescript-eslint/no-explicit-any': 'off',
|
'@typescript-eslint/no-explicit-any': 'off',
|
||||||
'space-before-function-paren': 'off',
|
'space-before-function-paren': 'off',
|
||||||
|
'object-curly-spacing': ['error', 'always'],
|
||||||
semi: ['warn', 'always'],
|
semi: ['warn', 'always'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -46,8 +46,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {RouterLink, RouterView} from 'vue-router';
|
import { RouterLink, RouterView } from 'vue-router';
|
||||||
import {ref} from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
const about = ref();
|
const about = ref();
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {ref} from 'vue';
|
import { ref } from 'vue';
|
||||||
import {usePartyLineStore} from '../stores/partyLine';
|
import { usePartyLineStore } from '../stores/partyLine';
|
||||||
|
|
||||||
const partyLineName = ref('');
|
const partyLineName = ref('');
|
||||||
const status = ref('');
|
const status = ref('');
|
||||||
|
|
|
@ -15,12 +15,12 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {ref, onMounted} from 'vue';
|
import { ref, onMounted } from 'vue';
|
||||||
import {usePartyLineStore} from '../stores/partyLine';
|
import { usePartyLineStore } from '../stores/partyLine';
|
||||||
import {storeToRefs} from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
|
|
||||||
const partyLineStore = usePartyLineStore();
|
const partyLineStore = usePartyLineStore();
|
||||||
const {partyLines} = storeToRefs(partyLineStore);
|
const { partyLines } = storeToRefs(partyLineStore);
|
||||||
|
|
||||||
const selectedPartyLine = ref('');
|
const selectedPartyLine = ref('');
|
||||||
|
|
||||||
|
|
|
@ -9,16 +9,16 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {computed, onMounted, ref} from 'vue';
|
import { computed, onMounted, ref } from 'vue';
|
||||||
import {usePartyLineStore} from '../stores/partyLine';
|
import { usePartyLineStore } from '../stores/partyLine';
|
||||||
import {storeToRefs} from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
|
|
||||||
const partyLineName = ref('');
|
const partyLineName = ref('');
|
||||||
const status = ref('');
|
const status = ref('');
|
||||||
const error = ref('');
|
const error = ref('');
|
||||||
const partyLineStore = usePartyLineStore();
|
const partyLineStore = usePartyLineStore();
|
||||||
|
|
||||||
const {partyLine, partyLineDeletedFlag, eventSource} = storeToRefs(partyLineStore);
|
const { partyLine, partyLineDeletedFlag, eventSource } = storeToRefs(partyLineStore);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (partyLineDeletedFlag.value) {
|
if (partyLineDeletedFlag.value) {
|
||||||
|
@ -28,7 +28,7 @@ onMounted(() => {
|
||||||
if (!eventSource.value?.readyState) {
|
if (!eventSource.value?.readyState) {
|
||||||
status.value = 'Not connected to any Party Lines...';
|
status.value = 'Not connected to any Party Lines...';
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
const partyLineModel = computed({
|
const partyLineModel = computed({
|
||||||
get: () => partyLineName.value ? partyLineName.value : partyLine.value,
|
get: () => partyLineName.value ? partyLineName.value : partyLine.value,
|
||||||
|
@ -74,7 +74,7 @@ const joinPartyLine = async () => {
|
||||||
status.value = error.message || 'An error occurred';
|
status.value = error.message || 'An error occurred';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {usePartyLineStore} from '../stores/partyLine';
|
import { usePartyLineStore } from '../stores/partyLine';
|
||||||
import {storeToRefs} from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
|
|
||||||
const partyLineStore = usePartyLineStore();
|
const partyLineStore = usePartyLineStore();
|
||||||
const {rumor} = storeToRefs(partyLineStore);
|
const { rumor } = storeToRefs(partyLineStore);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {computed, ref} from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import {usePartyLineStore} from "@/stores/partyLine.ts";
|
import { usePartyLineStore } from "@/stores/partyLine.ts";
|
||||||
import {storeToRefs} from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
|
|
||||||
const partyLineStore = usePartyLineStore();
|
const partyLineStore = usePartyLineStore();
|
||||||
const {partyLine} = storeToRefs(partyLineStore);
|
const { partyLine } = storeToRefs(partyLineStore);
|
||||||
|
|
||||||
const rumor = ref('');
|
const rumor = ref('');
|
||||||
const partyLineName = ref('');
|
const partyLineName = ref('');
|
||||||
|
@ -32,7 +32,7 @@ const sendRumor = async () => {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
},
|
},
|
||||||
body: JSON.stringify({partyLine: partyLine.value, rumor: rumor.value}),
|
body: JSON.stringify({ partyLine: partyLine.value, rumor: rumor.value }),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import './assets/style.css'
|
import './assets/style.css';
|
||||||
|
|
||||||
import {createApp} from 'vue'
|
import { createApp } from 'vue';
|
||||||
import {createPinia} from 'pinia'
|
import { createPinia } from 'pinia';
|
||||||
|
|
||||||
import App from './App.vue'
|
import App from './App.vue';
|
||||||
import router from './router'
|
import router from './router';
|
||||||
|
|
||||||
const app = createApp(App)
|
const app = createApp(App);
|
||||||
|
|
||||||
app.use(createPinia())
|
app.use(createPinia());
|
||||||
app.use(router)
|
app.use(router);
|
||||||
|
|
||||||
app.mount('#app')
|
app.mount('#app');
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import {createRouter, createWebHistory} from 'vue-router'
|
import { createRouter, createWebHistory } from 'vue-router';
|
||||||
import HomeView from "@/views/HomeView.vue";
|
import HomeView from "@/views/HomeView.vue";
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
|
@ -15,6 +15,6 @@ const router = createRouter({
|
||||||
component: () => import('../views/AdminView.vue'),
|
component: () => import('../views/AdminView.vue'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
});
|
||||||
|
|
||||||
export default router
|
export default router;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {defineStore} from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import {ref} from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
export const usePartyLineStore = defineStore('partyLine', () => {
|
export const usePartyLineStore = defineStore('partyLine', () => {
|
||||||
const partyLine = ref('');
|
const partyLine = ref('');
|
||||||
|
@ -69,7 +69,7 @@ export const usePartyLineStore = defineStore('partyLine', () => {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
},
|
},
|
||||||
body: JSON.stringify({partyLine}),
|
body: JSON.stringify({ partyLine }),
|
||||||
});
|
});
|
||||||
|
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
@ -93,7 +93,7 @@ export const usePartyLineStore = defineStore('partyLine', () => {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
},
|
},
|
||||||
body: JSON.stringify({partyLine}),
|
body: JSON.stringify({ partyLine }),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { fileURLToPath, URL } from 'node:url'
|
import { fileURLToPath, URL } from 'node:url';
|
||||||
|
|
||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite';
|
||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue';
|
||||||
import vueDevTools from 'vite-plugin-vue-devtools'
|
import vueDevTools from 'vite-plugin-vue-devtools';
|
||||||
import tailwindcss from '@tailwindcss/vite'
|
import tailwindcss from '@tailwindcss/vite';
|
||||||
|
|
||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
@ -21,4 +21,4 @@ export default defineConfig({
|
||||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue