1 | initial version |
To automatically format Ruby or .erb files in VS Code, you can follow these steps:
In the ‘settings.json’ file, add the following line:
"ruby.format": "rubocop"
Save the file and close it.
Alternatively, you can also click on the ‘Format Document’ option in the context menu (right-click) of the editor.