perf: 新包使用更严格的eslint

This commit is contained in:
vben
2023-04-06 23:28:37 +08:00
parent 762e5dee14
commit 6890dd7201
20 changed files with 99 additions and 49 deletions

View File

@@ -1,4 +1,4 @@
module.exports = {
root: true,
extends: ['@vben'],
extends: ['@vben/eslint-config/strict'],
};

View File

@@ -1,5 +1,4 @@
export * from './onMountedOrActivated';
export * from './useAttrs';
export * from './useRefs';
export { useTimeoutFn } from '@vueuse/core';

View File

@@ -1,5 +1,5 @@
import { type AnyFunction } from '@vben/types';
import { nextTick, onMounted, onActivated } from 'vue';
import { nextTick, onActivated, onMounted } from 'vue';
/**
* 在 OnMounted 或者 OnActivated 时触发

View File

@@ -1,5 +1,5 @@
import { getCurrentInstance, reactive, shallowRef, watchEffect } from 'vue';
import { type Recordable } from '@vben/types';
import { getCurrentInstance, reactive, shallowRef, watchEffect } from 'vue';
interface Options {
excludeListeners?: boolean;

View File

@@ -1,5 +1,5 @@
import type { Ref } from 'vue';
import { ref, onBeforeUpdate } from 'vue';
import { onBeforeUpdate, ref } from 'vue';
export function useRefs(): [Ref<HTMLElement[]>, (index: number) => (el: HTMLElement) => void] {
const refs = ref([]) as Ref<HTMLElement[]>;