s-KaiNet / spfx-check-locale

Check the consistency of your localization files inside SharePoint Framework projects.
https://marketplace.visualstudio.com/items?itemName=s-kainet.spfx-check-locale
MIT License
3 stars 1 forks source link

VSCode extension only works for a specific folder #2

Open nils-a opened 4 days ago

nils-a commented 4 days ago

I am a user of the VSCode extension, and it works really well. However, it only works when VSCode is opened in the folder where the package.json resides. (I.e. the main folder of the spfx) If I open VSCode one folder "above" that, the extension stops working.

Love the extension, btw. It is really helpful, thank you for it.

nils-a commented 4 days ago

At a first glance, it seems this is related to

https://github.com/s-KaiNet/spfx-check-locale/blob/2f96a003b003b9c649e324dcb7e3236ee7ada7f6/module/src/common/Utils.ts#L40

When I open a folder "one level above", there is a folder between the projectPath and the config/config.json.

s-KaiNet commented 4 days ago

But if you open one folder above, there might be many sub-folders, the extensions doesn't know were exactly spfx solution is. Thus it works properly only if open spfx solution as root project in vscode. How do you see the fix for this issue?

nils-a commented 4 days ago

Not sure, tbh. I'll think about it.