Tired of Messy Code?š„“
Aurnab Das
Posted on June 23, 2024
Want to Make Your Code Look Pretty and Well-Organized?
Try the š£šæš²ššš¶š²šæ extension in VS Code!š”
šŖšµš®š š¶š š£šæš²ššš¶š²šæ?
ā³ Prettier is a tool that makes your code look neat and consistent.
ā³ It works by checking your code and fixing its style according to set rules.
ā³ Prettier supports many programming languages and works with most code editors, including Visual Studio Code (VS Code).
ā³ By using Prettier, your code will always be clean, easy to read, and free of style issues.
šš¼š šš¼ šš»ššš®š¹š¹ š£šæš²ššš¶š²šæ š¶š» š©š¦ šš¼š±š²:
1ļøā£ Open š©š¦ šš¼š±š².
2ļøā£ Go to the šš šš²š»šš¶š¼š»š šš¶š²š by clicking on the Extensions icon in the Activity Bar on the side of the window or by pressing šššæš¹+š¦šµš¶š³š+š«.
3ļøā£ Search for "š£šæš²ššš¶š²šæ - šš¼š±š² š³š¼šæšŗš®ššš²šæ" in the search bar.
4ļøā£ Select the first one which appears in the search results, Click on the š¶š»ššš®š¹š¹ šÆšššš¼š».
5ļøā£ Once installed, you can š°š¹š¼šš² ššµš² šš šš²š»šš¶š¼š»š šš¶š²š.
šš¼š šš¼ šš»š®šÆš¹š² šššš¼ š¦š®šš² š®š»š± šššš¼ šš¼šæšŗš®š šš¶ššµ š£šæš²ššš¶š²šæ:
1ļøā£ Open the Command Palette by pressing šššæš¹+š¦šµš¶š³š+š£.
2ļøā£ Type and select Preferences: š¢š½š²š» š¦š²ššš¶š»š“š (šš¦š¢š”).
3ļøā£ Add the following settings to your šš²ššš¶š»š“š.š·šš¼š» file:
{
"editor.formatOnSave": true,
"editor.defaultFormatter":
"esbenp.prettier-vscode"
}
4ļøā£ Save the šš²ššš¶š»š“š.š·šš¼š» file.
Now, every time you save your any file in VS Code, Prettier will automatically format your code according to its rules.āØ
Posted on June 23, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.