Docs: Document how to import and configure the parser for flat config #8959
Labels
awaiting response
Issues waiting for a reply from the OP or another party
documentation
Documentation ("docs") that needs adding/updating
Before You File a Documentation Request Please Confirm You Have Done The Following...
Suggested Changes
Currently, the documentation for flat config only shows how to dangerously apply global overrides instead of scoping rules to specific files:
this means that to construct a safe configuration object a user must inspect the contents of each
tseslint.configs.*
and carefully merge them together into one object.When doing so, the surprising thing I found is that tseslint does not currently support flat config correctly, as it still uses
extends
, the old parser and parserOptions setup, and uses strings to declare the parser and plugins neither of which is supported by eslint anymore:current parser config:
typescript-eslint/packages/eslint-plugin/src/configs/base.ts
Lines 1 to 7 in 9e0d9f5
which is used by the tseslint recommended config here: https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/recommended.ts
docs for new config: https://eslint.org/docs/latest/use/configure/parser#configure-a-custom-parser
Affected URL(s)
https://typescript-eslint.io/users/configs/
The text was updated successfully, but these errors were encountered: