I made a table
const transitions: any = [
/* fromState event toState callback */
t(States.zombie, Events.click, States.walk, ()=>animation("walk")),
t(States.walk, Events.click, States.jog, ()=>animation("jog")),
t(States.jog, Events.off, States.off, onClose),
but prettier keep truncating spaces which would be normal but unreadable at first glance:
const transitions: any = [
/* fromState event toState callback */
t(States.zombie, Events.click, States.walk, ()=>animation("walk")),
t(States.walk, Events.click, States.jog, ()=>animation("jog")),
t(States.jog, Events.off, States.off, onClose),
How to instruct prettier to keep spaces/ formatting?
Prettier has // prettier-ignore
comment to stop uglifying line below it.
More details can be read in prettier documentation.