fix(eslint): add browser globals

thx @binaryoverload
This commit is contained in:
limes.pink 2025-04-15 15:49:25 +02:00
parent 83da6fb210
commit e6af4df65d
2 changed files with 4 additions and 2 deletions

View File

@ -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: {

View File

@ -16,9 +16,7 @@ function handleDropdownButton(dropdown: boolean | string) {
const scrollY = ref<number>(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;
});
});