fix: fix build warning and linter error
This commit is contained in:
@@ -20,4 +20,21 @@ export default defineConfigWithVueTs(
|
||||
vueTsConfigs.recommended,
|
||||
|
||||
...pluginOxlint.buildFromOxlintConfigFile('.oxlintrc.json'),
|
||||
|
||||
// 该前端由旧前端迁移而来,不得已使用 any,因此关闭此规则
|
||||
{
|
||||
name: 'app/legacy-no-explicit-any',
|
||||
rules: {
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
},
|
||||
},
|
||||
|
||||
// views/ 目录下为路由页面级组件,非通用组件,不会与 HTML 原生元素冲突,因此关闭多词组件名检查
|
||||
{
|
||||
name: 'app/views-single-word',
|
||||
files: ['src/views/**/*.vue'],
|
||||
rules: {
|
||||
'vue/multi-word-component-names': 'off',
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
@@ -53,7 +53,7 @@ const cancelUpdateItem = () => {
|
||||
<div class="paperbox-item-words">
|
||||
<p v-show="!isEditing">{{ name }}</p>
|
||||
<div v-show="isEditing" class="control">
|
||||
<input v-model="editingName" class="input" type="text"></input>
|
||||
<input v-model="editingName" class="input" type="text" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ const router = createRouter({
|
||||
routes: routes,
|
||||
});
|
||||
|
||||
router.beforeEach((to, from) => {
|
||||
router.beforeEach((to, _from) => {
|
||||
// Only check for those flagged.
|
||||
const token = useTokenStore();
|
||||
if (to.meta.requireLoggedInCheck) {
|
||||
|
||||
@@ -212,7 +212,7 @@ const deleteSharingItem = async (username: string) => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-for="item in ownedItems.values()" style="display: flex; flex-flow: column; margin-top: 1.25rem;">
|
||||
<div v-for="item in ownedItems.values()" :key="item[0]" style="display: flex; flex-flow: column; margin-top: 1.25rem;">
|
||||
<OwnedItem :uuid="item[0]" :name="item[1]" @delete="deleteOwnedItem" @share="shareOwnedItem"
|
||||
@update="updateOwnedItem" />
|
||||
</div>
|
||||
@@ -243,7 +243,7 @@ const deleteSharingItem = async (username: string) => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-for="item in sharingItems" style="display: flex; flex-flow: column; margin-top: 1.25rem;">
|
||||
<div v-for="item in sharingItems" :key="item" style="display: flex; flex-flow: column; margin-top: 1.25rem;">
|
||||
<SharingItem :username="item" @delete="deleteSharingItem" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,6 +16,18 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
// 静默来自 Bulma 0.9.1 的 Sass 弃用警告(import / global-builtin / color-functions / slash-div / if-function)
|
||||
// Bulma 0.9.1(发布于 2021 年)与新版 Dart Sass 不兼容。
|
||||
// 我的 pnpm-lock.yaml 和 node_modules 中的 Dart Sass 是 Vite 8 自带的新版本,而 Bulma 0.9.1 使用了大量已被 deprecate 的 Sass 老语法。
|
||||
// 我不想做任何升级,因此强制压制这些错误,还编译日志一个干净。
|
||||
silenceDeprecations: ['import', 'global-builtin', 'color-functions', 'slash-div', 'if-function'],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// 项目基础路径(对应 Nginx 路由到的 /web 前缀)
|
||||
base: '/web/',
|
||||
|
||||
|
||||
Reference in New Issue
Block a user