Vuex Auto Namespace Syntax Highlight not working

I just started using vuex auto-namespace in one of my projects in Webstorm.

Now my mutations, actions, and getters no longer highlight. They all work fine. But they are greyed out and 'find usages' no longer recognizes them.

In the mean time, I figured out that it will at least highlight the function name if you use it like so:
`console.log ('functionName')`

It doesn't matter where the usage is. I just made a function that I never call that holds all these console.logs so I can at least easily see the names.

Does anyone know a way to make it work properly?

3 comments

Vuex auto-namespacing requires adding special support. please vote for https://youtrack.jetbrains.com/issue/WEB-30491 and linked ticket

1

Ha! I created that ticket!

 

Am I allowed to vote for my own ticket?

0

I found a hack that allows find-usages to work. And by hack I mean "guy who thinks he knows but doesn't" because it's ugly and clutters up the code.

I create local scope strings wherever I have a dispatch or commit.

let thing1 = 'actionName1';

let thing2 = 'actionName2';

It's ugly, but it works. I don't look forward to backing it out later...

To make it easier to back out later I keep them all together in any given function, just above the first dispatch or commit.

0

Please sign in to leave a comment.