INTO-CPS-Association / DTaaS

:factory: :left_right_arrow: :busts_in_silhouette: Digital Twin as a Service
https://into-cps-association.github.io/DTaaS/
Other
116 stars 57 forks source link

[BUG] Calling yarn syntax in servers/lib directory throws ConfigError #1065

Open atomicgamedeveloper opened 2 weeks ago

atomicgamedeveloper commented 2 weeks ago

Describe the bug

In spite of having the same eslint.config.js configuration as in servers/execution/runner, calling yarn syntax from servers/lib throws the following error:

yarn run v1.22.22
warning ..\..\..\..\..\package.json: No license field
$ eslint . --fix

Oops! Something went wrong! :(

ESLint: 9.11.1

ConfigError: Config (unnamed): Unexpected key "0" found.
    at rethrowConfigError (C:\Path\to\DTaaS\servers\lib\node_modules\@eslint\config-array\dist\cjs\index.cjs:303:8)
    at C:\Path\to\DTaaS\servers\lib\node_modules\@eslint\config-array\dist\cjs\index.cjs:1098:5
    at Array.reduce (<anonymous>)
    at FlatConfigArray.getConfigWithStatus (C:\Path\to\DTaaS\servers\lib\node_modules\@eslint\config-array\dist\cjs\index.cjs:1091:43)
    at FlatConfigArray.getConfig (C:\Path\to\DTaaS\servers\lib\node_modules\@eslint\config-array\dist\cjs\index.cjs:1120:15)
    at C:\Path\to\DTaaS\servers\lib\node_modules\eslint\lib\eslint\eslint-helpers.js:354:54
    at C:\Path\to\DTaaS\servers\lib\node_modules\eslint\lib\eslint\eslint-helpers.js:296:32
    at Object.isAppliedFilter (C:\Path\to\DTaaS\servers\lib\node_modules\@nodelib\fs.walk\out\readers\common.js:12:31)
    at AsyncReader._handleEntry (C:\Path\to\DTaaS\servers\lib\node_modules\@nodelib\fs.walk\out\readers\async.js:86:20)
    at C:\Path\to\DTaaS\servers\lib\node_modules\@nodelib\fs.walk\out\readers\async.js:65:22
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

but it works servers/execution/runner.

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'servers/lib'
  2. Run 'yarn syntax'
  3. See error

Expected behavior

Eslint reporting syntax issues without error and listing changes.

Screenshots

Unnecessary.

Application Environment

Please provide the following information:

Additional context

Eslint in the runner directory has version ^9.11.1 and ^9.13.0 in the lib directory. This is likely the discrepancy. Furthermore, eslint-config-airbnb-base appears to still be incompatible with version ^9.13.0 of Eslint.