chore: fix lint issues

vite8^2
xingyu4j 2026-03-15 16:35:34 +08:00
parent 9ddb899a1a
commit ab3e6bb37c
13 changed files with 9 additions and 19 deletions

View File

@ -10,7 +10,6 @@ import { $t } from '@vben/locales';
import { initComponentAdapter } from './component'; import { initComponentAdapter } from './component';
// oxlint-disable-next-line typescript/no-floating-promises
initComponentAdapter(); initComponentAdapter();
setupVbenForm<ComponentType>({ setupVbenForm<ComponentType>({

View File

@ -112,7 +112,7 @@ const gridOptions: VxeGridProps<RowType> = {
}, },
toolbarConfig: { toolbarConfig: {
// //
// @ts-ignore // @ts-ignore -
search: true, search: true,
}, },
}; };

View File

@ -1,5 +1,3 @@
// @ts-check
import { defineConfig } from '@vben/eslint-config'; import { defineConfig } from '@vben/eslint-config';
export default defineConfig(); export default defineConfig();

View File

@ -49,10 +49,8 @@ async function viteExtraAppConfigPlugin({
console.log(colors.cyan(`✨configuration file is build successfully!`)); console.log(colors.cyan(`✨configuration file is build successfully!`));
} catch (error) { } catch (error) {
// oxlint-disable-next-line no-console
console.log( console.log(
colors.red( colors.red(
// oxlint-disable-next-line typescript/restrict-template-expressions
`configuration file configuration file failed to package:\n${error}`, `configuration file configuration file failed to package:\n${error}`,
), ),
); );

View File

@ -68,7 +68,6 @@ async function viteImportMapPlugin(
}); });
if (options?.debug) { if (options?.debug) {
// oxlint-disable-next-line typescript/no-floating-promises
(async () => { (async () => {
for await (const { message, type } of generator.logStream()) { for await (const { message, type } of generator.logStream()) {
console.log(`${type}: ${message}`); console.log(`${type}: ${message}`);
@ -139,7 +138,6 @@ async function viteImportMapPlugin(
buildEnd() { buildEnd() {
// 未生成importmap时抛出错误防止被turbo缓存 // 未生成importmap时抛出错误防止被turbo缓存
if (!installed && !isSSR) { if (!installed && !isSSR) {
// oxlint-disable-next-line no-unused-expressions
installError && console.error(installError); installError && console.error(installError);
throw new Error('Importmap installation failed.'); throw new Error('Importmap installation failed.');
} }

View File

@ -26,7 +26,7 @@ interface Props {
const props = withDefaults(defineProps<Props>(), {}); const props = withDefaults(defineProps<Props>(), {});
// @ts-expect-error unused // @ts-expect-error - unused
const { contentElement, overlayStyle } = useLayoutContentStyle(); const { contentElement, overlayStyle } = useLayoutContentStyle();
const style = computed((): CSSProperties => { const style = computed((): CSSProperties => {

View File

@ -12,11 +12,11 @@ const { isFullscreen, toggle } = useFullscreen();
// //
isFullscreen.value = !!( isFullscreen.value = !!(
document.fullscreenElement || document.fullscreenElement ||
// @ts-expect-error: vendor fullscreen APIs are not included in the standard DOM typings // @ts-expect-error - vendor fullscreen APIs are not included in the standard DOM typings
document.webkitFullscreenElement || document.webkitFullscreenElement ||
// @ts-expect-error: vendor fullscreen APIs are not included in the standard DOM typings // @ts-expect-error - vendor fullscreen APIs are not included in the standard DOM typings
document.mozFullScreenElement || document.mozFullScreenElement ||
// @ts-expect-error: vendor fullscreen APIs are not included in the standard DOM typings // @ts-expect-error - vendor fullscreen APIs are not included in the standard DOM typings
document.msFullscreenElement document.msFullscreenElement
); );
</script> </script>

View File

@ -28,9 +28,9 @@ const emit = defineEmits<{
}>(); }>();
const active = defineModel<string>('active'); const active = defineModel<string>('active');
// @ts-expect-error unused // @ts-expect-error - unused
const contentRef = ref(); const contentRef = ref();
// @ts-expect-error unused // @ts-expect-error - unused
const tabRef = ref(); const tabRef = ref();
const style = computed(() => { const style = computed(() => {

View File

@ -233,7 +233,6 @@ function drawPiece(
ctx.fillStyle = 'rgba(255, 255, 255, 0.7)'; ctx.fillStyle = 'rgba(255, 255, 255, 0.7)';
ctx.strokeStyle = 'rgba(255, 255, 255, 0.7)'; ctx.strokeStyle = 'rgba(255, 255, 255, 0.7)';
ctx.stroke(); ctx.stroke();
// oxlint-disable-next-line no-unused-expressions
opr === canvasOpr.clip ? ctx.clip() : ctx.fill(); opr === canvasOpr.clip ? ctx.clip() : ctx.fill();
ctx.globalCompositeOperation = 'destination-over'; ctx.globalCompositeOperation = 'destination-over';
} }

View File

@ -11,7 +11,7 @@ import type {
} from './types'; } from './types';
import { computed, useAttrs } from 'vue'; import { computed, useAttrs } from 'vue';
// @ts-expect-error: vue-json-viewer does not expose compatible typings for this import path // @ts-expect-error - vue-json-viewer does not expose compatible typings for this import path
import VueJsonViewer from 'vue-json-viewer'; import VueJsonViewer from 'vue-json-viewer';
import { $t } from '@vben/locales'; import { $t } from '@vben/locales';

View File

@ -82,7 +82,6 @@ const toggleKeydownListener = () => {
}; };
const toggleOpen = () => { const toggleOpen = () => {
// oxlint-disable-next-line no-unused-expressions
open.value ? modalApi.close() : modalApi.open(); open.value ? modalApi.close() : modalApi.open();
}; };

View File

@ -41,7 +41,7 @@ const bindProps = computed(() => {
function toggleTheme(event: MouseEvent) { function toggleTheme(event: MouseEvent) {
const isAppearanceTransition = const isAppearanceTransition =
// @ts-expect-error: startViewTransition is not available in the current DOM lib target // @ts-expect-error - startViewTransition is not available in the current DOM lib target
document.startViewTransition && document.startViewTransition &&
!window.matchMedia('(prefers-reduced-motion: reduce)').matches; !window.matchMedia('(prefers-reduced-motion: reduce)').matches;
if (!isAppearanceTransition || !event) { if (!isAppearanceTransition || !event) {

View File

@ -168,7 +168,6 @@ function printResult(
`${UNICODE.FAILURE} ${totalCount} problem (${errorCount} errors, ${warningCount} warnings, ${suggestionsCount} suggestions)`, `${UNICODE.FAILURE} ${totalCount} problem (${errorCount} errors, ${warningCount} warnings, ${suggestionsCount} suggestions)`,
), ),
); );
// oxlint-disable-next-line no-unused-expressions
!check && process.exit(1); !check && process.exit(1);
} else { } else {
consola.log(colors.green(`${UNICODE.SUCCESS} No problem`)); consola.log(colors.green(`${UNICODE.SUCCESS} No problem`));