From e6af4df65d26e0c6f2526110464cf7fe00d62ad2 Mon Sep 17 00:00:00 2001 From: "limes.pink" Date: Tue, 15 Apr 2025 15:49:25 +0200 Subject: [PATCH] fix(eslint): add browser globals thx @binaryoverload --- eslint.config.mjs | 4 ++++ src/components/Navbar/Navbar.vue | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 048ef5c..8941c1c 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,5 +1,6 @@ import pluginVue from 'eslint-plugin-vue'; import eslintConfig from '@pretendonetwork/eslint-config'; +import globals from 'globals'; import { withNuxt } from './.nuxt/eslint.config.mjs'; export default withNuxt([ @@ -10,6 +11,9 @@ export default withNuxt([ languageOptions: { parserOptions: { parser: '@typescript-eslint/parser' + }, + globals: { + ...globals.browser } }, rules: { diff --git a/src/components/Navbar/Navbar.vue b/src/components/Navbar/Navbar.vue index a72eb88..f940cac 100644 --- a/src/components/Navbar/Navbar.vue +++ b/src/components/Navbar/Navbar.vue @@ -16,9 +16,7 @@ function handleDropdownButton(dropdown: boolean | string) { const scrollY = ref(0); onMounted(() => { - // eslint-disable-next-line no-undef -- we're in on mounted so it should be fine window.addEventListener('scroll', () => { - // eslint-disable-next-line no-undef -- same here scrollY.value = window.scrollY; }); });