open-telemetry / opentelemetry-js-contrib

OpenTelemetry instrumentation for JavaScript modules
https://opentelemetry.io
Apache License 2.0
692 stars 506 forks source link

Upgrade eslint to flat config #1635

Open blumamir opened 1 year ago

blumamir commented 1 year ago

Recently, renovate opened those 2 PRs regarding prettier: #1630 and #1629

Apparently, eslint has a new way of handling configs called flat configs. More info here: https://eslint.org/docs/latest/use/configure/configuration-files-new

In #1629 , part of the changelog includes:

Added: The CLI helper tool now works with eslint.config.js (flat config). Just like ESLint itself, the CLI tool automatically first tries eslint.config.js and then eslintrc, and you can force which one to use by setting the [ESLINT_USE_FLAT_CONFIG] environment variable. Note that the config of eslint-config-prettier has always been compatible with eslint.config.js (flat config) – it was just the CLI tool that needed updating. On top of that, the docs have been updated to mention how to use both eslint.config.js (flat config) and eslintrc, and the tests now test both config systems.

It seems they have moved to a simpler config structure, but for us to use the new versions we have to follow the Configuration Migration Guide.

This issue is to track this task. It should probably include:

walter-0 commented 1 week ago

I'd like to take this