I suspect this may be a setting in your editor. E.g. VS Code doesn't format anything for me automatically.