Skip to content

Change Request: Add API for integrators to easily swap between flat config and eslintrc APIs #18075

Closed

Description

ESLint version

v8, v9

What problem do you want to solve?

Right now, we use the /use-at-your-own-risk entrypoint for accessing non-default objects like FlatESLint and LegacyESLint, but doing so requires integrators to pull from different locations depending on which mode they want to run ESLint in. This is error-prone, especially if they don't know the version of ESLint ahead of time.

What do you think is the correct solution?

Add an API, exported from the main entrypoint, that allows access to the correct APIs and provide that in v8, v9, and v10 to ease integration difficulty.

Potentially move shouldUseFlatConfig to the main entrypoint as an export.

Participation

  • I am willing to submit a pull request for this change.

Additional comments

No response

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

Metadata

Assignees

Labels

acceptedThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussioncoreRelates to ESLint's core APIs and featuresenhancementThis change enhances an existing feature of ESLint

Type

No type

Projects

  • Status

    Complete
  • Status

    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions