-
-
Notifications
You must be signed in to change notification settings - Fork 63
Description
I'm working on fixing a bug in the MDX VS Code extension and I've found that it's caused by configFileName pointing to a directory containing a tsconfig.json rather than to the tsconfig.json file itself. I assume this is due to how I have my project references setup (it's permitted to reference a directory rather than the tsconfig.json directly, e.g. https://github.com/pinyinlylabs/pinyinly/blob/f7e3769d8a3f7a3cccb9e53766194877f6469ea3/projects/app/tsconfig.json#L35).
The fix seems fairly simple:
configFileName = typescript.findConfigFile(configFileName, typescript.sys.fileExists);I can do this in the extension itself https://github.com/bradleyayers/mdx-analyzer/blob/f55d6471224c5df25d7d4a71c5c4806cd06e6859/packages/language-server/lib/index.js#L56, but it might be better to fix it in this package instead, so that configFileName actually points to a file rather than a directory (give the name is suffixed with FileName it seems reasonable that consumers would assume it's already been resolved to a file path.