Skip to content

Docs: Mention ESLint's defineConfig (until tseslint.config is deprecated) #11313

Closed
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Before You File a Documentation Request Please Confirm You Have Done The Following...

Suggested Changes

Forking out of #10935:

Now that ESLint has launched defineConfig(), it would be nice to update the typescript-eslint docs to use that instead tseslint.config() (and perhaps deprecate tseslint.config() altogether?).

We'd really, really like to do that. But we're currently blocked from suggesting defineConfig due to type incompatibilities (#10899). Those type incompatibilities are quite a difficult, long process (#11190 -> eslint/rewrite#226, etc.). Which means we're stuck in this awkward state right now:

  • Users are getting confused about the relationship between the new defineConfig and soon-to-be-legacy tseslint.config
  • We can't recommend defineConfig because it causes type errors and resultant no-unsafe-* lint reports when configs are type-checked

In the meantime, we can do a compromise of mentioning defineConfig in the docs. We've ideated having it as either:

  • An admonition under Flat Config saying something like like "ESLint also has defineConfig(), which we will soon recommend pending "
  • A third tab alongside Flat Config with a name like ESLint's defineConfig, with that indication inside it

Affected URL(s)

https://typescript-eslint.io/getting-started
https://typescript-eslint.io/getting-started/legacy-eslint-setup
https://typescript-eslint.io/getting-started/typed-linting
https://typescript-eslint.io/packages/typescript-eslint#config

Additional Info

This came out of some internal brainstorming on how we can try to help+inform users without leading them down unnecessary config rabbit holes.

Co-authored-by: @bradzacher, @kirkwaiblinger

💖

Metadata

Metadata

Labels

documentationDocumentation ("docs") that needs adding/updatingteam assignedA member of the typescript-eslint team should work on this.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions