lint: disable now unused eslint rules

This commit is contained in:
MiniDigger | Martin 2024-08-29 20:35:36 +02:00
parent 6db55be779
commit bb5d73e278
7 changed files with 7908 additions and 5822 deletions

View File

@ -19,6 +19,7 @@ module.exports = {
"@vue/typescript/recommended",
"plugin:eslint-comments/recommended",
"prettier",
"plugin:oxlint/recommended",
],
plugins: ["unicorn"],
ignorePatterns: ["src/types/backend/**"],

View File

@ -89,6 +89,7 @@
"eslint-import-resolver-typescript": "3.6.1",
"eslint-plugin-eslint-comments": "3.2.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-oxlint": "0.9.1",
"eslint-plugin-unicorn": "51.0.1",
"eslint-plugin-vue": "9.27.0",
"husky": "9.1.4",

File diff suppressed because it is too large Load Diff

View File

@ -225,7 +225,12 @@ function isRecent(date: string): boolean {
</template>
</DropdownButton>
</div>
<button class="flex rounded-md p-2" hover="text-primary-500 bg-primary-0 dark:(text-white bg-zinc-700)" aria-label="Toogle dark mode" @click="settings.toggleDarkMode()">
<button
class="flex rounded-md p-2"
hover="text-primary-500 bg-primary-0 dark:(text-white bg-zinc-700)"
aria-label="Toogle dark mode"
@click="settings.toggleDarkMode()"
>
<icon-mdi-weather-night v-if="settings.darkMode" class="text-[1.2em]"></icon-mdi-weather-night>
<icon-mdi-white-balance-sunny v-else class="text-[1.2em]"></icon-mdi-white-balance-sunny>
</button>
@ -345,11 +350,18 @@ function isRecent(date: string): boolean {
<!-- Login/register buttons -->
<div v-else class="flex gap-2">
<NuxtLink class="flex items-center rounded-md p-2 hover:(text-primary-500 bg-primary-0 dark:(text-white bg-zinc-700))" :to="auth.loginUrl(route.fullPath)" rel="nofollow">
<NuxtLink
class="flex items-center rounded-md p-2 hover:(text-primary-500 bg-primary-0 dark:(text-white bg-zinc-700))"
:to="auth.loginUrl(route.fullPath)"
rel="nofollow"
>
<icon-mdi-key-outline class="mr-1 flex-shrink-0 text-[1.2em]" />
{{ t("nav.login") }}
</NuxtLink>
<NuxtLink class="flex items-center rounded-md p-2 hover:(text-primary-500 bg-primary-0 dark:(text-white bg-zinc-700))" :to="auth.signupUrl(route.fullPath)">
<NuxtLink
class="flex items-center rounded-md p-2 hover:(text-primary-500 bg-primary-0 dark:(text-white bg-zinc-700))"
:to="auth.signupUrl(route.fullPath)"
>
<icon-mdi-clipboard-outline class="mr-1 flex-shrink-0 text-[1.2em]" />
{{ t("nav.signup") }}
</NuxtLink>

View File

@ -44,8 +44,8 @@ async function togglePin() {
</h3>
<IconMdiCancel v-if="project.visibility === Visibility.SoftDelete" />
<IconMdiEyeOff v-if="project.visibility !== Visibility.Public" />
<button v-if="canEdit" @click.prevent="togglePin" :title="'Toggle pinned status for project ' + project.namespace.slug">
<IconMdiPinOff class="hidden group-hover:block" v-if="pinned" />
<button v-if="canEdit" :title="'Toggle pinned status for project ' + project.namespace.slug" @click.prevent="togglePin">
<IconMdiPinOff v-if="pinned" class="hidden group-hover:block" />
<IconMdiPin v-else class="hidden group-hover:block" />
</button>
</div>

View File

@ -55,7 +55,7 @@ class Auth {
authLog("lock over", result);
return result;
}
// eslint-disable-next-line no-async-promise-executor
this.refreshPromise = new Promise<false | string>(async (resolve) => {
const refreshToken = useCookie("HangarAuth_REFRESH").value;
if (import.meta.env.SSR && !refreshToken) {

View File

@ -31,7 +31,6 @@ export function useDataLoader<K extends keyof DataLoaderTypes>(key: K) {
return newParam;
} else if (newParam) {
promises.push(
// eslint-disable-next-line no-async-promise-executor
new Promise<void>(async (resolve, reject) => {
console.log("load loading", key);
const result = await loader(newParam).catch((err) => {
@ -101,7 +100,7 @@ export function useData<T, P extends Record<string, unknown> | string>(
status.value = "idle";
return undefined;
}
// eslint-disable-next-line no-async-promise-executor
return new Promise<void>(async (resolve, reject) => {
console.log("load", key(params));
try {