Browse Source

chore: fix lint issues

pull/7661/head
xingyu4j 1 week ago
parent
commit
ab3e6bb37c
  1. 1
      docs/src/_env/adapter/form.ts
  2. 2
      docs/src/demos/vben-vxe-table/form/index.vue
  3. 2
      eslint.config.mjs
  4. 2
      internal/vite-config/src/plugins/extra-app-config.ts
  5. 2
      internal/vite-config/src/plugins/importmap.ts
  6. 2
      packages/@core/ui-kit/layout-ui/src/components/layout-content.vue
  7. 6
      packages/@core/ui-kit/shadcn-ui/src/components/full-screen/full-screen.vue
  8. 4
      packages/@core/ui-kit/tabs-ui/src/components/tabs-chrome/tabs.vue
  9. 1
      packages/effects/common-ui/src/components/captcha/slider-translate-captcha/index.vue
  10. 2
      packages/effects/common-ui/src/components/json-viewer/index.vue
  11. 1
      packages/effects/layouts/src/widgets/global-search/global-search.vue
  12. 2
      packages/effects/layouts/src/widgets/theme-toggle/theme-button.vue
  13. 1
      scripts/vsh/src/publint/index.ts

1
docs/src/_env/adapter/form.ts

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

2
docs/src/demos/vben-vxe-table/form/index.vue

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

2
eslint.config.mjs

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

2
internal/vite-config/src/plugins/extra-app-config.ts

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

2
internal/vite-config/src/plugins/importmap.ts

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

2
packages/@core/ui-kit/layout-ui/src/components/layout-content.vue

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

6
packages/@core/ui-kit/shadcn-ui/src/components/full-screen/full-screen.vue

@ -12,11 +12,11 @@ const { isFullscreen, toggle } = useFullscreen();
//
isFullscreen.value = !!(
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 ||
// @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 ||
// @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
);
</script>

4
packages/@core/ui-kit/tabs-ui/src/components/tabs-chrome/tabs.vue

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

1
packages/effects/common-ui/src/components/captcha/slider-translate-captcha/index.vue

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

2
packages/effects/common-ui/src/components/json-viewer/index.vue

@ -11,7 +11,7 @@ import type {
} from './types';
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 { $t } from '@vben/locales';

1
packages/effects/layouts/src/widgets/global-search/global-search.vue

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

2
packages/effects/layouts/src/widgets/theme-toggle/theme-button.vue

@ -41,7 +41,7 @@ const bindProps = computed(() => {
function toggleTheme(event: MouseEvent) {
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 &&
!window.matchMedia('(prefers-reduced-motion: reduce)').matches;
if (!isAppearanceTransition || !event) {

1
scripts/vsh/src/publint/index.ts

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

Loading…
Cancel
Save