refactor: 使用eslint.config.js替换.eslintrc.js并遵循esm语法 (#786)

This commit is contained in:
xiaoming
2023-11-10 23:18:01 +08:00
committed by GitHub
parent 18158f8e0d
commit 5b7dd8c3e2
102 changed files with 431 additions and 424 deletions

View File

@@ -81,8 +81,8 @@ function onMouseleave() {
placeholder="请选择动画"
clearable
filterable
@clear="onClear"
:filter-method="filterMethod"
@clear="onClear"
>
<template #empty>
<div class="w-[280px]">

View File

@@ -1,4 +1,4 @@
import { PropType } from "vue";
import type { PropType } from "vue";
import propTypes from "@/utils/propTypes";
export const countToProps = {
startVal: propTypes.number.def(0),

View File

@@ -1,4 +1,4 @@
import { PropType } from "vue";
import type { PropType } from "vue";
import propTypes from "@/utils/propTypes";
export const reboundProps = {
delay: propTypes.number.def(1),

View File

@@ -10,7 +10,7 @@ import {
ref,
unref,
computed,
PropType,
type PropType,
onMounted,
onUnmounted,
defineComponent

View File

@@ -84,11 +84,11 @@ function handleClose(
<template>
<el-dialog
class="pure-dialog"
v-for="(options, index) in dialogStore"
:key="index"
v-bind="options"
v-model="options.visible"
class="pure-dialog"
:fullscreen="fullscreen ? true : options?.fullscreen ? true : false"
@close="handleClose(options, index)"
@opened="eventsCallBack('open', options, index)"
@@ -123,8 +123,8 @@ function handleClose(
</i>
</div>
<component
v-else
:is="options?.headerRenderer({ close, titleId, titleClass })"
v-else
/>
</template>
<component

View File

@@ -1,5 +1,5 @@
import "./index.css";
import { h, defineComponent, Component } from "vue";
import { h, defineComponent, type Component } from "vue";
export interface attrsType {
width?: string;

View File

@@ -18,7 +18,6 @@ export default defineComponent({
name: "ReFlop",
props,
setup(props) {
// eslint-disable-next-line vue/no-setup-props-destructure
const { frontText, backText, duration } = props;
const isFlipping = ref(false);
const flipType = ref("down");

View File

@@ -35,9 +35,9 @@ const nodeDragNode = item => {
<!-- 左侧bpmn元素选择器 -->
<div class="node-panel">
<div
class="node-item dark:text-bg_color"
v-for="item in props.nodeList"
:key="item.text"
class="node-item dark:text-bg_color"
@mousedown="nodeDragNode(item)"
>
<div class="node-item-icon" :class="item.class">

View File

@@ -151,8 +151,8 @@ watch(
</template>
<el-input
class="px-2 pt-2"
v-model="filterValue"
class="px-2 pt-2"
placeholder="搜索图标"
clearable
/>

View File

@@ -1,5 +1,5 @@
import { iconType } from "./types";
import { h, defineComponent, Component } from "vue";
import type { iconType } from "./types";
import { h, defineComponent, type Component } from "vue";
import { IconifyIconOnline, IconifyIconOffline, FontIcon } from "../index";
/**

View File

@@ -4,13 +4,13 @@ import {
watch,
nextTick,
computed,
PropType,
type PropType,
defineComponent
} from "vue";
import "./index.scss";
import propTypes from "@/utils/propTypes";
import { isString, cloneDeep } from "@pureadmin/utils";
import QRCode, { QRCodeRenderersOptions } from "qrcode";
import QRCode, { type QRCodeRenderersOptions } from "qrcode";
import RefreshRight from "@iconify-icons/ep/refresh-right";
interface QrcodeLogo {

View File

@@ -498,16 +498,16 @@ defineExpose({
<template>
<div :ref="'wrap' + props.classOption['key']">
<div
:style="leftSwitch"
v-if="navigation"
:style="leftSwitch"
:class="leftSwitchClass"
@click="leftSwitchClick"
>
<slot name="left-switch" />
</div>
<div
:style="rightSwitch"
v-if="navigation"
:style="rightSwitch"
:class="rightSwitchClass"
@click="rightSwitchClick"
>
@@ -526,7 +526,7 @@ defineExpose({
<div :ref="'slotList' + props.classOption['key']" :style="float">
<slot />
</div>
<div v-html="copyHtml" :style="float" />
<div :style="float" v-html="copyHtml" />
</div>
</div>
</template>

View File

@@ -55,7 +55,6 @@ export default defineComponent({
emits: ["selectedVal"],
setup(props, { emit }) {
const instance = getCurrentInstance();
// eslint-disable-next-line vue/no-setup-props-destructure
const currentValue = props.value;
const rateDisabled = computed(() => {

View File

@@ -1,4 +1,4 @@
import { defineComponent, ref, unref, computed, PropType } from "vue";
import { defineComponent, ref, unref, computed, type PropType } from "vue";
import resizer from "./resizer";
import "./index.css";