You've already forked AstralRinth
forked from didirus/AstralRinth
Add linter
This commit is contained in:
13
theseus_gui/.editorconfig
Normal file
13
theseus_gui/.editorconfig
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
max_line_length = 100
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
@@ -4,29 +4,18 @@
|
|||||||
"es2021": true,
|
"es2021": true,
|
||||||
"node": true
|
"node": true
|
||||||
},
|
},
|
||||||
"extends": [
|
"extends": ["eslint:recommended", "plugin:vue/vue3-recommended", "prettier"],
|
||||||
"eslint:recommended",
|
|
||||||
"plugin:vue/vue3-recommended",
|
|
||||||
"plugin:@typescript-eslint/recommended",
|
|
||||||
"prettier"
|
|
||||||
],
|
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"ecmaVersion": "latest",
|
"ecmaVersion": "latest",
|
||||||
"parser": "@typescript-eslint/parser",
|
|
||||||
"sourceType": "module"
|
"sourceType": "module"
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": ["vue"],
|
||||||
"vue",
|
|
||||||
"@typescript-eslint"
|
|
||||||
],
|
|
||||||
"rules": {
|
"rules": {
|
||||||
"no-console": "off",
|
"no-console": "off",
|
||||||
"vue/no-v-html": "off",
|
"vue/no-v-html": "off",
|
||||||
"comma-dangle": [
|
"comma-dangle": ["error", "only-multiline"],
|
||||||
"error",
|
"vue/comment-directive": "off",
|
||||||
"only-multiline"
|
|
||||||
],
|
|
||||||
"vue/multi-word-component-names": "off",
|
"vue/multi-word-component-names": "off",
|
||||||
"import/no-named-as-default": "off"
|
"import/no-named-as-default": "off"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,4 +3,4 @@
|
|||||||
"semi": false,
|
"semi": false,
|
||||||
"singleQuote": true,
|
"singleQuote": true,
|
||||||
"endOfLine": "auto"
|
"endOfLine": "auto"
|
||||||
}
|
}
|
||||||
|
|||||||
6
theseus_gui/.vscode/extensions.json
vendored
6
theseus_gui/.vscode/extensions.json
vendored
@@ -1,7 +1,3 @@
|
|||||||
{
|
{
|
||||||
"recommendations": [
|
"recommendations": ["Vue.volar", "tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
|
||||||
"Vue.volar",
|
|
||||||
"tauri-apps.tauri-vscode",
|
|
||||||
"rust-lang.rust-analyzer"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
"eslint": "^8.35.0",
|
"eslint": "^8.35.0",
|
||||||
"eslint-config-prettier": "^8.6.0",
|
"eslint-config-prettier": "^8.6.0",
|
||||||
"eslint-plugin-vue": "^9.9.0",
|
"eslint-plugin-vue": "^9.9.0",
|
||||||
"prettier": "^2.8.4",
|
"prettier": "^2.8.7",
|
||||||
"sass": "^1.58.3",
|
"sass": "^1.58.3",
|
||||||
"vite": "^4.0.0",
|
"vite": "^4.0.0",
|
||||||
"vite-plugin-eslint": "^1.8.1"
|
"vite-plugin-eslint": "^1.8.1"
|
||||||
|
|||||||
@@ -26,9 +26,7 @@
|
|||||||
"depends": []
|
"depends": []
|
||||||
},
|
},
|
||||||
"externalBin": [],
|
"externalBin": [],
|
||||||
"icon": [
|
"icon": ["icons/favicon.ico"],
|
||||||
"icons/favicon.ico"
|
|
||||||
],
|
|
||||||
"identifier": "com.tauri.dev",
|
"identifier": "com.tauri.dev",
|
||||||
"longDescription": "",
|
"longDescription": "",
|
||||||
"macOS": {
|
"macOS": {
|
||||||
@@ -63,4 +61,4 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,12 @@ watch(theme, (newState) => {
|
|||||||
</div>
|
</div>
|
||||||
<div class="instance-list">
|
<div class="instance-list">
|
||||||
<p>Instances</p>
|
<p>Instances</p>
|
||||||
<Instance v-for="instance in instances.instances" display="list" :instance="instance" />
|
<Instance
|
||||||
|
v-for="instance in instances.instances"
|
||||||
|
:key="instance.id"
|
||||||
|
display="list"
|
||||||
|
:instance="instance"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Button class="add-instance-btn">
|
<Button class="add-instance-btn">
|
||||||
<PlusIcon />
|
<PlusIcon />
|
||||||
|
|||||||
@@ -5,9 +5,22 @@ import News from '@/components/ui/News.vue'
|
|||||||
import { onMounted, onUnmounted, ref } from 'vue'
|
import { onMounted, onUnmounted, ref } from 'vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
instances: Array,
|
instances: {
|
||||||
news: Array,
|
type: Array,
|
||||||
label: String,
|
default() {
|
||||||
|
return []
|
||||||
|
},
|
||||||
|
},
|
||||||
|
news: {
|
||||||
|
type: Array,
|
||||||
|
default() {
|
||||||
|
return []
|
||||||
|
},
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
canPaginate: Boolean,
|
canPaginate: Boolean,
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -66,7 +79,7 @@ const handleRightPage = () => {
|
|||||||
<ChevronRightIcon @click="handleRightPage" />
|
<ChevronRightIcon @click="handleRightPage" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<section ref="modsRow" class="instances" v-if="shouldRenderNormalInstances">
|
<section v-if="shouldRenderNormalInstances" ref="modsRow" class="instances">
|
||||||
<Instance
|
<Instance
|
||||||
v-for="instance in props.instances"
|
v-for="instance in props.instances"
|
||||||
:key="instance.id"
|
:key="instance.id"
|
||||||
@@ -74,8 +87,8 @@ const handleRightPage = () => {
|
|||||||
:instance="instance"
|
:instance="instance"
|
||||||
/>
|
/>
|
||||||
</section>
|
</section>
|
||||||
<section ref="newsRow" class="news" v-else-if="shouldRenderNews">
|
<section v-else-if="shouldRenderNews" ref="newsRow" class="news">
|
||||||
<News v-for="news in props.news" :key="news.id" :news="news" />
|
<News v-for="newsValue in props.news" :key="newsValue.id" :news="newsValue" />
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -3,8 +3,16 @@ import { RouterLink } from 'vue-router'
|
|||||||
import { Card, PlusIcon } from 'omorphia'
|
import { Card, PlusIcon } from 'omorphia'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
display: String,
|
display: {
|
||||||
instance: Object,
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
instance: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -13,7 +21,7 @@ const props = defineProps({
|
|||||||
<RouterLink v-if="display === 'list'" class="instance-list-item" :to="`${props.instance.id}`">{{
|
<RouterLink v-if="display === 'list'" class="instance-list-item" :to="`${props.instance.id}`">{{
|
||||||
props.instance.name
|
props.instance.name
|
||||||
}}</RouterLink>
|
}}</RouterLink>
|
||||||
<Card class="instance-card-item" v-else-if="display === 'card'">
|
<Card v-else-if="display === 'card'" class="instance-card-item">
|
||||||
<img :src="props.instance.img" alt="Trending mod card" />
|
<img :src="props.instance.img" alt="Trending mod card" />
|
||||||
<div class="project-info">
|
<div class="project-info">
|
||||||
<p class="title">{{ props.instance.name }}</p>
|
<p class="title">{{ props.instance.name }}</p>
|
||||||
|
|||||||
@@ -2,7 +2,12 @@
|
|||||||
import { Card, ChevronRightIcon } from 'omorphia'
|
import { Card, ChevronRightIcon } from 'omorphia'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
news: Object,
|
news: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ const popularInstances = instances.instances.filter((i) => i.downloads > 50 || i
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="page-container">
|
<div class="page-container">
|
||||||
<RowDisplay label="Jump back in" :instances="recentInstances" :canPaginate="false" />
|
<RowDisplay label="Jump back in" :instances="recentInstances" :can-paginate="false" />
|
||||||
<RowDisplay label="Popular packs" :instances="popularInstances" :canPaginate="true" />
|
<RowDisplay label="Popular packs" :instances="popularInstances" :can-paginate="true" />
|
||||||
<RowDisplay label="News & updates" :news="news.news" :canPaginate="true" />
|
<RowDisplay label="News & updates" :news="news.news" :can-paginate="true" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { defineConfig } from 'vite'
|
|||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue'
|
||||||
import alias from '@rollup/plugin-alias'
|
import alias from '@rollup/plugin-alias'
|
||||||
import { resolve } from 'path'
|
import { resolve } from 'path'
|
||||||
|
import eslint from 'vite-plugin-eslint'
|
||||||
|
|
||||||
const projectRootDir = resolve(__dirname)
|
const projectRootDir = resolve(__dirname)
|
||||||
|
|
||||||
@@ -17,6 +18,7 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
|
eslint(),
|
||||||
],
|
],
|
||||||
|
|
||||||
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
|
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
|
||||||
|
|||||||
@@ -1186,10 +1186,10 @@ prelude-ls@^1.2.1:
|
|||||||
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
|
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
|
||||||
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
|
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
|
||||||
|
|
||||||
prettier@^2.8.4:
|
prettier@^2.8.7:
|
||||||
version "2.8.4"
|
version "2.8.7"
|
||||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.4.tgz#34dd2595629bfbb79d344ac4a91ff948694463c3"
|
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.7.tgz#bb79fc8729308549d28fe3a98fce73d2c0656450"
|
||||||
integrity sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==
|
integrity sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==
|
||||||
|
|
||||||
proxy-from-env@^1.1.0:
|
proxy-from-env@^1.1.0:
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user