Skip to content

Conversation

@jasonlyu123
Copy link
Member

@jasonlyu123 jasonlyu123 commented Dec 30, 2022

added in typescript 4.8 https://devblogs.microsoft.com/typescript/announcing-typescript-4-8/#exclude-specific-files-from-auto-imports

The pattern normalization part is adopted from VSCode. But I found leading wildcard patterns don't work in Windows. It does work in Ubuntu WSL. So I changed it also to append workspace root. (Noted to self, should open an issue on either VSCode or TypeScript to ask about it)

Also, should we default some SvelteKit files with this config? Like +error.{svelte,ts,js}. Seen someone in the discord a few times accidentally trigger auto import when trying to throw an error.

https://discord.com/channels/457912077277855764/1053932682955997234/1053932682955997234

Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I'd wait a little longer before adding any defaults. Did you see other instances of this discord question (meaning that a lot of people run into this issue)?

@dummdidumm dummdidumm merged commit 062216f into sveltejs:master Jan 9, 2023
@jasonlyu123 jasonlyu123 deleted the auto-import-exclude branch January 10, 2023 04:25
@jasonlyu123
Copy link
Member Author

jasonlyu123 commented Jan 10, 2023

At least one more. Another solution is to deprioritize +error (or other route files) in completion since they're rarely auto-imported.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants