refac: linter 관련 설정 변경 및 적용, map_theme 변수 제거

- eslint에 prettier 조합
- prettierrc에 width 120, tabWidth 2
- gameStor->map_theme 제거
- map_theme, mapTheme를 GameConst::$mapName으로 대체
- eslint에서 vue/vue3-essential 대신 vue3-recommended 적용
  - vue/max-attributes-per-line 완화
  - vue/v-on-event-hyphenation 해제
  - vue/attribute-hyphenation 해제
- 일부 tsc import type warning 해결
- 일부 vue template type warning 해결
- 일부 vue SFC를 script setup으로 변경
  - TipTap
  - TopBackBar
  - BottomBackBar
  - BoardArticle
  - ProcessCity
This commit is contained in:
2022-03-29 02:06:47 +09:00
parent e569ffe8f4
commit 4f4533e533
79 changed files with 4541 additions and 3020 deletions
+27 -38
View File
@@ -1,25 +1,20 @@
<template>
<TopBackBar
:title="commandName"
:type="procEntryMode"
v-model:searchable="searchable"
/>
<TopBackBar v-model:searchable="searchable" :title="commandName" :type="procEntryMode" />
<div class="bg0">
<MapLegacyTemplate
v-model="selectedCityObj"
:isDetailMap="false"
:clickableAll="true"
:neutralView="true"
:useCachedMap="true"
:mapTheme="mapTheme"
v-model="selectedCityObj"
:mapName="mapName"
/>
<div v-if="commandName == '선전포고'">
타국에게 선전 포고합니다.<br />
선전 포고할 국가를 목록에서 선택하세요.<br />
고립되지 않은 아국 도시에서 인접한 국가에 선포 가능합니다.<br />
초반제한 해제 2년전부터 선포가 가능합니다. ({{ startYear + 1 }} 1월부터
가능)<br />
초반제한 해제 2년전부터 선포가 가능합니다. ({{ startYear + 1 }} 1월부터 가능)<br />
현재 선포가 불가능한 국가는 배경색이
<span style="color: red">붉은색</span>으로 표시됩니다.<br />
</div>
@@ -58,14 +53,12 @@
<div class="row">
<div class="col-6 col-md-3">
국가 :
<SelectNation
:nations="nationList"
v-model="selectedNationID"
:searchable="searchable"
/>
<SelectNation v-model="selectedNationID" :nations="nationList" :searchable="searchable" />
</div>
<div class="col-4 col-md-2 d-grid">
<b-button @click="submit">{{ commandName }}</b-button>
<b-button @click="submit">
{{ commandName }}
</b-button>
</div>
</div>
</div>
@@ -73,24 +66,20 @@
</template>
<script lang="ts">
import MapLegacyTemplate, {
MapCityParsed,
} from "@/components/MapLegacyTemplate.vue";
import MapLegacyTemplate, { type MapCityParsed } from "@/components/MapLegacyTemplate.vue";
import SelectNation from "@/processing/SelectNation.vue";
import { defineComponent, ref } from "vue";
import { unwrap } from "@/util/unwrap";
import { Args } from "@/processing/args";
import type { Args } from "@/processing/args";
import TopBackBar from "@/components/TopBackBar.vue";
import BottomBar from "@/components/BottomBar.vue";
import {
getProcSearchable,
procNationItem,
procNationList,
} from "./processingRes";
declare const mapTheme: string;
declare const commandName: string;
declare const entryInfo: ['General'|'Nation', unknown];
import { getProcSearchable, type procNationItem, type procNationList } from "./processingRes";
declare const staticValues: {
mapName: string;
commandName: string;
entryInfo: ["General" | "Nation", unknown];
};
declare const procRes: {
nationList: procNationList;
startYear: number;
@@ -103,14 +92,6 @@ export default defineComponent({
TopBackBar,
BottomBar,
},
watch: {
selectedCityObj(city: MapCityParsed) {
if (!city.nationID) {
return;
}
this.selectedNationID = city.nationID;
},
},
setup() {
const nationList = new Map<number, procNationItem>();
for (const nationItem of procRes.nationList) {
@@ -134,17 +115,25 @@ export default defineComponent({
}
return {
procEntryMode: entryInfo[0] == "Nation" ? "chief" : "normal",
procEntryMode: (staticValues.entryInfo[0] == "Nation" ? "chief" : "normal") as 'chief'|'normal',
searchable: getProcSearchable(),
startYear: procRes.startYear,
mapTheme: ref(mapTheme),
mapName: staticValues.mapName,
nationList: ref(nationList),
selectedCityObj,
selectedNationID,
commandName,
commandName: staticValues.commandName,
selectedNation,
submit,
};
},
watch: {
selectedCityObj(city: MapCityParsed) {
if (!city.nationID) {
return;
}
this.selectedNationID = city.nationID;
},
},
});
</script>