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

Code formatter, anon functions #57

Closed
infu opened this issue Sep 29, 2022 · 2 comments · Fixed by #59
Closed

Code formatter, anon functions #57

infu opened this issue Sep 29, 2022 · 2 comments · Fixed by #59

Comments

@infu
Copy link

infu commented Sep 29, 2022

Code formatter messes up anonymous functions as function parameters, puts them in one line and when there are comments, breaks the code.

@infu
Copy link
Author

infu commented Sep 29, 2022

job_add( func () : async () {
                
                    await job_canister_start({slot = new_history_slot});
                    //await job_oracle_set({slot = new_history_slot; oracle = _oracle});
                    await job_conf_set({slot = new_history_slot; config = _conf});
});

will result in

job_add( func () : async () {await job_canister_start({slot = new_history_slot}); //await job_oracle_set({slot = new_history_slot; oracle = _oracle});  await job_conf_set({slot = new_history_slot; config = _conf}); });

@rvanasa
Copy link
Contributor

rvanasa commented Sep 29, 2022

This will be fixed in the next release (v0.4.7). Cheers!

In the meantime, you can use a // prettier-ignore comment to work around this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants