Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade eslint to flat config #1635

Open
blumamir opened this issue Aug 12, 2023 · 1 comment · May be fixed by #2487
Open

Upgrade eslint to flat config #1635

blumamir opened this issue Aug 12, 2023 · 1 comment · May be fixed by #2487
Labels
discussion never-stale up-for-grabs Good for taking. Extra help will be provided by maintainers

Comments

@blumamir
Copy link
Member

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:

  • bumping the versions of everything eslint and prettier related in the project to latest versions
  • Update the project to use the new simplified formats
  • Remove all the references to old config objects which should now be part of the root eslint.configs.js. For example, the package.json scripts should not include the --ext .ts part for all packages in the monorepo in "lint": "eslint . --ext .ts",
  • Run linting on the project and either fix new lint issues, or apply relevant configuration to disable them.
@walter-0
Copy link

I'd like to take this

walter-0 added a commit to walter-0/opentelemetry-js-contrib that referenced this issue Oct 16, 2024
@walter-0 walter-0 linked a pull request Oct 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion never-stale up-for-grabs Good for taking. Extra help will be provided by maintainers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants