Editor Setup
Now we will go over some IDE configurations we recommend you use that will help when working in the Snapcaster code base.
Prettier in Visual Studio Code
One problem we have as developers is maintaining the same code formatting with our auto format extensions. In the front-end and back-end repos, you will find a .prettierrc
file which will standardize the formatting when working in the repos.
This will also be important for utilizing the tailwind css auto formatter package in the front end repo. Class names will be autoformatted in a standardized format which will help minimize confusing file changes in PR Reviews
In Visual Studio Code:
-
Navigate to the extensions tab.
-
Search and install
Prettier - Code Formatter
by Prettier. -
In your VS Code settings and search
prettier
. -
In the text editor tab, set your default formatter to
Prettier - Code Formatter
. -
Search
format on save
in the settings search bar and enableEditor: Format On Save
.