Skip to content

Commit

Permalink
Create Prettier_Apex.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitasare7 authored Jan 15, 2024
1 parent b863804 commit 755ccb8
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions Prettier_Apex.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Install Prettier Apex Globally --> npm install -g prettier-plugin-apex

Modify below files -->

settings.json
{
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/.sfdx": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[apex]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}

.prettierrc
{
"trailingComma": "none",
"plugins": ["prettier-plugin-apex"],
"overrides": [
{
"files": "**/lwc/**/*.html",
"options": { "parser": "lwc" }
},
{
"files": "*.{cmp,page,component}",
"options": { "parser": "html" }
}
]
}

0 comments on commit 755ccb8

Please sign in to comment.