You can include a
prettier-ignore comment to achieve this goal.
// prettier-ignore const minesweeperMap = [ 'B', ' ', ' ', ' ', 'B', ' ', 'B', ' ', ' ', ' ', ' ', 'B', ]; const bombs = 4;
When you run prettier on the above code, the declaration of
bombs line will be changed to remove unneeded spaces, but the
minesweeperMap declaration will be left unchanged.