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

chore: upgrade eslint to 8.x & fix rules

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