提交 16be5a07 编写于 作者: L LeoKu

chore: upgrade eslint to 8.x & fix rules

上级 2d16d58b
......@@ -26,7 +26,6 @@ module.exports = {
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-recommended',
'plugin:prettier/recommended',
'plugin:tailwindcss/recommended',
],
plugins: ['simple-import-sort'],
rules: {
......@@ -45,7 +44,6 @@ module.exports = {
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/consistent-type-imports': 1,
'@typescript-eslint/no-non-null-assertion': 0,
'tailwindcss/no-custom-classname': 0,
},
ignorePatterns: [
'dist',
......
module.exports = {
arrowParens: 'always',
bracketSpacing: true,
jsxBracketSameLine: false,
bracketSameLine: false,
jsxSingleQuote: false,
printWidth: 80,
quoteProps: 'as-needed',
......
......@@ -17,7 +17,7 @@
/>
</div>
<ActionBar @actionHandler="handleAction" />
<ActionBar @action="handleAction" />
<div class="action-group">
<button class="action-randomize" @click="handleGenerate">
......@@ -48,7 +48,7 @@
/>
</div>
<Confetti />
<ConfettiCanvas />
<div class="gradient-bg">
<div class="gradient-top"></div>
......@@ -93,7 +93,7 @@ import {
} from '@/utils/constant'
import { recordEvent } from '@/utils/ga'
import Confetti from './components/Confetti.vue'
import ConfettiCanvas from './components/ConfettiCanvas.vue'
const store = useStore()
......
......@@ -6,7 +6,7 @@
class="menu-item"
:class="{ disabled: ac.disabled }"
:title="ac.tip"
@click="emit('actionHandler', ac.type)"
@click="emit('action', ac.type)"
>
<img :src="ac.icon" :alt="ac.tip" />
</div>
......@@ -25,7 +25,7 @@ import { ActionType } from '@/enums'
import { useStore } from '@/store'
const emit = defineEmits<{
(e: 'actionHandler', actionType: ActionType): void
(e: 'action', actionType: ActionType): void
}>()
const { t } = useI18n()
......
......@@ -14,6 +14,12 @@
</div>
</template>
<script lang="ts">
export interface VueColorAvatarRef {
avatarRef: HTMLDivElement
}
</script>
<script lang="ts" setup>
import { ref, toRefs, watchEffect } from 'vue'
......@@ -25,7 +31,7 @@ import { widgetData } from '@/utils/dynamic-data'
import Background from './widgets/Background.vue'
export interface VueColorAvatarProps {
interface VueColorAvatarProps {
option: AvatarOption
size?: number
}
......@@ -37,10 +43,6 @@ const props = withDefaults(defineProps<VueColorAvatarProps>(), {
const { option: avatarOption, size: avatarSize } = toRefs(props)
export interface VueColorAvatarRef {
avatarRef: HTMLDivElement
}
const avatarRef = ref<VueColorAvatarRef['avatarRef']>()
defineExpose({ avatarRef })
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册