Skip to content
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

Comments within assignment are mistransformed, eventually produces invalid lua #340

Closed
matthargett opened this issue Jan 18, 2022 · 0 comments · Fixed by #341
Closed

Comments within assignment are mistransformed, eventually produces invalid lua #340

matthargett opened this issue Jan 18, 2022 · 0 comments · Fixed by #341
Labels
bug Something isn't working

Comments

@matthargett
Copy link

with 0.11.3:

local useDisposableConcast =
		-- * Refetching uses a disposable Concast to allow refetches using different
		-- options/variables, without permanently altering the options of the
		-- original ObservableQuery.
		newNetworkStatus == NetworkStatus.refetch or
		-- * The fetchMore method does not actually call the reobserve method, but,
		-- if it did, it would definitely use a disposable Concast.
		newNetworkStatus == NetworkStatus.fetchMore or
		-- * Polling uses a disposable Concast so the polling options (which force
		-- fetchPolicy to be "network-only") won't override the original options.
		newNetworkStatus == NetworkStatus.poll 

it will keep changing the first 4 runs of stylua, then on the fifth run it produces:

error parsing: unexpected token `newNetworkStatus`. (starting from line 5, character 2 and ending on line 5, character 18)
additional information: expected expression
@JohnnyMorganz JohnnyMorganz added the bug Something isn't working label Jan 20, 2022
@JohnnyMorganz JohnnyMorganz changed the title stylua reversability bug that eventually produces invalid lua Comments within assignment are mistransformed, eventually produces invalid lua Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants