-
Notifications
You must be signed in to change notification settings - Fork 173
cosmetic changes #175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
cosmetic changes #175
Changes from all commits
884a527
c1d8970
d5a9c21
4bcf28b
ffcec92
b95b253
e275ee9
cf5eb0f
8590727
75d86c2
d866ce7
46646d2
4d02a09
0eb0b05
1cf8e43
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
npm run precommit |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,81 @@ | ||
{ | ||
"plugins": ["prettier-plugin-apex"], | ||
"arrowParens": "avoid", | ||
"bracketSpacing": true, | ||
"bracketSameLine": true, | ||
"printWidth": 100, | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"endOfLine": "lf", | ||
"apexInsertFinalNewline": false, | ||
"useTabs": true, | ||
"overrides": [ | ||
{ | ||
"files": "**/lwc/**/*.html", | ||
"options": { "parser": "lwc" } | ||
}, | ||
{ | ||
"files": "*.{cls,trigger}", | ||
"options": { "parser": "apex", "tabWidth": 2, "useTabs": true } | ||
}, | ||
{ | ||
"files": "*.trigger", | ||
"options": { "printWidth": 200 } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this different than the other print width specification There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When the width is less than 200, all the trigger contexts listed go one above each other on separate lines, making it unnecessarily harder (at least for me) to understand. However, since there are no triggers in this project, I can remove it. |
||
}, | ||
{ | ||
"files": "*.{cmp,page,component}", | ||
"options": { "parser": "html" } | ||
"options": { | ||
"parser": "html", | ||
"useTabs": true, | ||
"htmlWhitespaceSensitivity": "css" | ||
} | ||
}, | ||
{ | ||
"files": "*.{apex,soql}", | ||
"options": { "parser": "apex-anonymous" } | ||
}, | ||
{ | ||
"files": "*.{yml,yaml}", | ||
"options": { "parser": "yaml", "tabWidth": 2, "useTabs": false } | ||
}, | ||
{ | ||
"files": ".prettier*", | ||
"options": { "parser": "json", "printWidth": 80, "useTabs": true } | ||
}, | ||
{ | ||
"files": "*.xml", | ||
"options": { | ||
"parser": "xml", | ||
"useTabs": true, | ||
"singleQuote": false, | ||
"xmlSelfClosingSpace": true | ||
} | ||
}, | ||
{ | ||
"files": ["**/pmd/*.xml", "*ruleset*.xml", "config/**/*.xml"], | ||
"options": { | ||
"parser": "xml", | ||
"xmlSelfClosingSpace": true, | ||
"xmlWhitespaceSensitivity": "ignore" | ||
} | ||
}, | ||
{ | ||
"files": "*meta.xml", | ||
"options": { | ||
"parser": "xml", | ||
"useTabs": false, | ||
"xmlSelfClosingSpace": false | ||
} | ||
}, | ||
{ | ||
"files": "*.json", | ||
"options": { | ||
"parser": "json-stringify", | ||
"useTabs": false, | ||
"tabWidth": 2 | ||
} | ||
} | ||
] | ||
], | ||
"plugins": ["prettier-plugin-apex", "@prettier/plugin-xml"], | ||
"$schema": "https://json.schemastore.org/prettierrc" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,4 +45,4 @@ | |
"Trigger Actions [email protected]": "04tKY000000PdZJYA0", | ||
"Trigger Actions [email protected]": "04tKY000000PdZOYA0" | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the source of all of this customization in this file?
The standard config is available here. I see advantage in specifying
apexInsertFinalNewline : false
, but the rest of the stuff seems to be the project-specific configuration from another team's project.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the file I use for my projects - it has more granular items from my experiences. For example, the space before the closing
/>
on the top line of metadata files now won't trigger a whitespace change if the metadata is downloaded from the org.