Skip to content

Commit 1dd8ad9

Browse files
committed
refactor: disable specific ESLint rules and update array handling in theme toggle and NodeLog components
1 parent 90bb092 commit 1dd8ad9

4 files changed

Lines changed: 4 additions & 3 deletions

File tree

eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export default sxzz(
1818
{
1919
rules: {
2020
'unicorn/filename-case': 'off',
21+
'unicorn/no-array-reverse': 'off',
2122
'@eslint-community/eslint-comments/no-unlimited-disable': 'off', // 允许 eslint-disable 不指定规则
2223
},
2324
},

packages/business/src/components/logs/NodeLog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ export default {
410410
}
411411
queryMonitoringLogs(filter)
412412
.then((data = {}) => {
413-
const items = this.getFormatRow(data.items?.toReversed())
413+
const items = this.getFormatRow(data.items?.reverse())
414414
this.oldPageObj.total = data.total || 0
415415
this.oldPageObj.page = filter.page
416416

packages/component/src/theme-toggle/ThemeToggle copy.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const changeTheme = async (mode: 'light' | 'dark' | 'auto') => {
5959
]
6060
const animate = document.documentElement.animate(
6161
{
62-
clipPath: isDark ? clipPath.toReversed() : clipPath,
62+
clipPath: isDark ? [...clipPath].reverse() : clipPath,
6363
},
6464
{
6565
duration: 450,

packages/component/src/theme-toggle/ThemeToggle.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const changeTheme = (mode: 'light' | 'dark' | 'auto') => {
4242
]
4343
const animate = document.documentElement.animate(
4444
{
45-
clipPath: state.value === 'dark' ? clipPath.toReversed() : clipPath,
45+
clipPath: state.value === 'dark' ? [...clipPath].reverse() : clipPath,
4646
},
4747
{
4848
duration: 450,

0 commit comments

Comments
 (0)