planbcoding/vscode-react-refactor

Suggestions won't show up on lightbulb

Closed this issue · 3 comments

I have the extension installed but no extra options are displayed on the lightbulb

Using latest VSCode version on a macOS Catalina version 10.15.3

ezgif com-video-to-gif

Tested on .jsx file as well and didn't seem to work either

My guess is that it's conflicting with another extension. I currently have installed the following extensions

image

Its not always working for me either.

It seems to fail on some of my more hairy jsx

for instance:

<Panel
            key="Usage"
            defaultExpanded={true}
            collapsible
            header={
              <p>
                <FormattedMessage {...msg.USAGE_PANEL_TITLE} />
              </p>
            }
          >
            <em>
              <FormattedMessage {...msg.USAGE_PANEL_EXPLANATION} />
            </em>
            <ul>
              {Object.values(lists)
                .filter(l =>
                  l.modifications?.some(
                    m =>
                      m.type === 'EXPAND_PROTO' &&
                      m.payload.protoListId === list._id,
                  ),
                )
                .map(l => (
                  <li>{l.name}</li>
                ))}
            </ul>
          </Panel>

when i comment out the hairy bit, it works like charm!

I have no time to troubleshoot this any further, but love the extension so far :)

cheers

(by fail, i mean: it doesnt suggest the refactoring options)

Hi guys, thanks for the feedback!

The issue is probably related to a parsing error (something in the selected JSX or in the module scope).
From 1.1.0 we display the error message coming from the Parser.

Give it another try! Also, check Debug instructions in the Readme.