-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Enhancement: Include projectService: true
in type-checked configs
#10507
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
Comments
This is ... kind of scary at first 😅 to my knowledge we've never set up type checking for users before. My first big fear is that by hiding away the A more technical blocker would be that we still want people to set
If we could get the directory being linted from ESLint, then I think we could remove the need to strongly recommend IMO we should mark this as blocked on ☝ #10841. But if unblocked this would be really nice and I'd be very much in favor of it. 👍 |
This is one the areas where having config factories rather than prefab objects/arrays would be really nice (see also eslint/rfcs#126 (comment), for example). Would let us provide an API like export default tseslint.config(
// etc
tseslint.configs.enableTypedLinting({
// with intellisense, etc. Maybe even a required property.
tsconfigRootDir: import.meta.dirname;
});
) |
With the advent of flat configs we could probably request that ESLint passes the config path as |
👍 filed eslint/eslint#19438. Marking this blocked on that. |
Before You File a Proposal Please Confirm You Have Done The Following...
Relevant Package
typescript-eslint
My proposal is suitable for this project
Description
I propose that a config should be created identical to
recommendedTypeChecked
(as well as for its*TypeChecked
friends) but withprojectService: true
specified. That way, just astseslint.configs.recommended
enables TS language support intseslint.configs.recommended[0]
, the proposed config would enable TS language support with typed linting support that more-or-less works out of the box for Most™️ projects. I think this could significantly reduce the burden on users for setting up typed linting.I think it would be breaking to modify the existing configs, so we'd have to come up with a name for the
projectService: true
variant. Maybetseslint.configs.recommendedPreconfiguredTypeChecked
? Idk what a good name would be 🤷♂️Additional Info
Refs:
The text was updated successfully, but these errors were encountered: