Skip to content

Commit 6f5d8bb

Browse files
committed
fix: ignore CustomTopBar from lint
1 parent 305cde5 commit 6f5d8bb

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default antfu({
44
formatters: true,
55
unocss: true,
66
astro: true,
7-
ignores: ['./public/widget.css', './public/widget.js'],
7+
ignores: ['./public/widget.css', './public/widget.js', './src/components/CustomTopBar.astro'],
88
}, {
99
rules: {
1010
'no-console': 'off',

src/components/CustomTopBar.astro

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,7 @@ const version = import.meta.env.PACKAGE_VERSION || '0.0.2'
4444
// Add version info to logo title on page load
4545
document.addEventListener('DOMContentLoaded', () => {
4646
// Find the logo element (assuming it's the first child of the logo slot)
47-
const logoSlot = document.querySelector('nav [slot="logo"]') ||
48-
document.querySelector('nav a[href="/"]') ||
49-
document.querySelector('nav img') ||
50-
document.querySelector('nav svg')
51-
52-
if (logoSlot) {
53-
logoSlot.title = `Version ${version}`
54-
}
47+
const logoSlot = document.querySelector('nav [slot="logo"]') || document.querySelector('nav a[href="/"]') || document.querySelector('nav img') || document.querySelector('nav svg')
48+
if (logoSlot) logoSlot.title = `Version ${version}`
5549
})
5650
</script>

0 commit comments

Comments
 (0)