Skip to content

Commit

Permalink
perf: ➖ 去除冗余的配置
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed Apr 16, 2024
1 parent 4a8cc9f commit f10e259
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 19 deletions.
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

4 changes: 0 additions & 4 deletions .eslintrc.cjs

This file was deleted.

16 changes: 11 additions & 5 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import antfu from '@antfu/eslint-config'
import { createRequire } from 'node:module'
import antfu from '@antfu/eslint-config'

const require = createRequire(import.meta.url)

Expand All @@ -9,7 +9,13 @@ export default antfu(
{
typescript: false,
markdown: false,
ignores: ['node_modules', 'src/notes/public', 'dist', 'index.html'],
ignores: [
'node_modules',
'dist',
'index.html',
'src/notes/public',
'.vitepress/cache',
],
},
{
languageOptions: {
Expand All @@ -25,14 +31,14 @@ export default antfu(
'node/prefer-global/process': 'off',

'no-console': 'off',
curly: 'off',
eqeqeq: 'off',
'curly': 'off',
'eqeqeq': 'off',
'no-unused-vars': 'off',

'unused-imports/no-unused-vars': 'off',

'vue/html-self-closing': 'off',
'vue/block-order': 'off',
},
}
},
)
2 changes: 1 addition & 1 deletion src/components/HomeFeaturesBefore/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const { lang } = useData()
const features = computed(() => {
const repos = data.repos || []
// console.log('repos', repos)
return repos.map((item) => ({
return repos.map(item => ({
...item,
title: item.name,
details: item.description,
Expand Down
5 changes: 3 additions & 2 deletions src/components/HomeHeroImage/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ const lottieIndex = ref(sample(arrayLotties)[2])
const currentLottie = computed(() => arrayLotties[lottieIndex.value])
const currentLottieJSON = computed(
() => currentLottie.value?.[1]?.default || null
() => currentLottie.value?.[1]?.default || null,
)
const lottiePlayer = ref(null)
function loadNextLottie() {
if (lottieIndex.value < lengthLotties - 1) {
++lottieIndex.value
} else {
}
else {
lottieIndex.value = 0
}
// console.log('lottiePlayer', lottiePlayer)
Expand Down
3 changes: 2 additions & 1 deletion src/components/ViaLottiePlayer/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ if (!import.meta.env.SSR) {
await import('@lottiefiles/lottie-player')
renderLottie.value = true
} catch (error) {
}
catch (error) {
console.warn('error')
}
})()
Expand Down

0 comments on commit f10e259

Please sign in to comment.