Skip to content

Not compatible with eslint 9+. Invalid languageOptions.globals object key "AudioWorkletGlobalScope " #1269

@k-paxian

Description

@k-paxian

With latest eslint 9.17.0
They now validating the configs before applying them

this.language.validateLanguageOptions(this.languageOptions);

So it fails to apply this plugin 🤷

image
image

Also it needs to be aligned with this new way of defining globals
https://eslint.org/docs/latest/use/configure/language-options#predefined-global-variables

Activity

changed the title [-]Invalid `languageOptions.globals` object key "AudioWorkletGlobalScope "[/-] [+]Not compatible with eslint 9+. Invalid `languageOptions.globals` object key "AudioWorkletGlobalScope "[/+] on Jan 7, 2025
irmantasluk

irmantasluk commented on Jan 10, 2025

@irmantasluk

I have the same issue, same error.

Pentadome

Pentadome commented on Feb 25, 2025

@Pentadome

workaround. We shouldn't need these globals anyway

import pluginVueA11y from 'eslint-plugin-vuejs-accessibility';

const a11yConfig = pluginVueA11y.configs['flat/recommended'];

a11yConfig.forEach((x) => {
  // there seems to be problem with the globals.
  // We shouldn't need these anyways because we use typescript
  // to define global variables.
  // @ts-expect-error -- deleting is intentional here.
  delete x.languageOptions.globals;
});
G-Rath

G-Rath commented on Mar 21, 2025

@G-Rath

The actual fix for this is to update all versions of globals in your dependency tree, which you can typically do with npm update globals though you might need to "force" a higher major version to be used by explicitly adding globals as a dependency and then removing it again.

Specifically, you want to not be using v13.12.1.

An indirect issue with eslint-plugin-vuejs-accessibility that would help prevent this is that they're using globals as an implicit dependency, which is why package managers don't help you here - this can be fixed by #1280 and/or #1299

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Not compatible with eslint 9+. Invalid `languageOptions.globals` object key "AudioWorkletGlobalScope " · Issue #1269 · vue-a11y/eslint-plugin-vuejs-accessibility