-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
Seemingly unable to exclude node_modules from svelte-check pass #2514
Comments
Can you share what kind of |
I need to create ambient modules: declare module "@scope/utility-module" {
...
} These are modules exported by micro-frontends that are then consumed by other micro-frontends. All these are externalized, and then defined in an import map. |
That should work in a ts file as well. But if the module has an import map why do you have to declare it manually? Is there any error that can't be fixed in the |
The d.ts file is for Intellisense support. If not included, VS Code will report "could not find module definition or its declaration", or something like that. |
Oh right, it's import map, not export map. You do need the "declare module" or define it in the "paths" config. But yeah you can also use "define module" in a ts file so you don't disable skipLibCheck. |
Ok, thanks. So long story short: The Accurate? |
It is a common misunderstanding. It's just not what the config is meant for. https://www.typescriptlang.org/tsconfig/#exclude |
Describe the bug
Maybe this is not a bug, and maybe it is just me unable to configure things properly. Since I have struggled with this for a couple of hours already, I'll venture myself and post it as a bug. If you know better, please, by all means correct me.
I want to set
skipLibCheck: false
in mytsconfig.json
file because I am declaring some modules in .d.ts files and I want them checked. Doing this certainly makes VS Code correct my mistakes. Good. However,svelte-check
, when run, checks the d.ts files insidenode_modules
. I have tried many variations for excluding thenode_modules
folder without success.skipLibCheck: false
,exclude: [ "node_modules" ]
skipLibCheck: false
,exclude: [ "node_modules/" ]
skipLibCheck: false
,exclude: [ "./node_modules" ]
skipLibCheck: false
,exclude: [ "./node_modules/" ]
skipLibCheck: false
,exclude: [ "./node_modules/*" ]
skipLibCheck: false
,exclude: [ "./node_modules/**" ]
skipLibCheck: false
,exclude: [ "node_modules/**" ]
skipLibCheck: false
,exclude: [ "node_modules/**/*.d.ts" ]
And the list goes on and on.
Reproduction
npm create vite@latest
. Select Svelte, then Typescript.npm install svelte@next svelte-check@4
tsconfig.json
withskipLibCheck: false
and your favorite version ofexclude
.Let me know how it goes. For me, it complains about
node_modules/svelte/types/index.d.ts
andnode_modules/svelte-check/dist/src/svelte-shims-v4.d.ts
.Expected behaviour
No definition files are checked inside the
node_modules
folder.System Info
Which package is the issue about?
svelte-check
Additional Information, eg. Screenshots
No response
The text was updated successfully, but these errors were encountered: