Tired of Messy Code?šŸ„“

aurnab990

Aurnab Das

Posted on June 23, 2024

Tired of Messy Code?šŸ„“

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.āœØ

šŸ’– šŸ’Ŗ šŸ™… šŸš©
aurnab990
Aurnab Das

Posted on June 23, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Tired of Messy Code?šŸ„“
vscode Tired of Messy Code?šŸ„“

June 23, 2024