bigbite / build-tools

MIT License
6 stars 1 forks source link

[Bug]: Failed to load plugin '@typescript-eslint' in v1.3.1 #107

Closed markgoodyear closed 5 months ago

markgoodyear commented 5 months ago

What happened?

Upgrading build tools from 1.3.0 to 1.3.1 gives the error Unexpected token '||=' (see full log output).

Looking at the ESLint config between 1.3.0 and 1.3.1, it happens when adding plugin:@typescript-eslint/recommended to the extends property, which previously would have been missing as it was defined on the nested (incorrect) version:

module.exports = {
  globals: {
    __DEV__: true,
    __PROD__: true,
    __TEST__: true,
    wp: true,
  },
  env: {
    browser: true,
    es2021: true,
    node: true,
  },
  extends: ['airbnb', 'prettier', 'plugin:@typescript-eslint/recommended'], // <— HERE
  parser: '@babel/eslint-parser',
  parserOptions: {
    requireConfigFile: false,
    babelOptions: {
      ...babelConfig,
    },
  // ...
}

Updating on the https://github.com/bigbite/block-tabbed-content repo.

Potentially related to what @g-elwell found in https://github.com/bigbite/build-tools/issues/106#issuecomment-2031299934.

Which environments are you experiencing the issue on?

CLI (macOS, Windows, etc)

Relevant log output

ERROR in [eslint] Failed to load plugin '@typescript-eslint' declared in 'BaseConfig': Unexpected token '||='
Referenced from: BaseConfig
markgoodyear commented 5 months ago

Just to follow up this is project is currently running Node 14, which could be a part of the issue.

markgoodyear commented 5 months ago

Confirmation of Node 14 being the issue. Closing. Hopefully helps anyone hitting this issue in the future.