Questions tagged [prettier]
The prettier tag has no usage guidance.
10
questions
1
vote
1
answer
500
views
Prettier error when formatting Apex classes: spawnSync EINVAL
I helped set up Prettier for a colleague yesterday and this morning I found my Prettier started dumping EINVAL errors for Apex classes. I can run Prettier just fine on javascript files for LWCs, but I ...
2
votes
1
answer
79
views
Beautify code snippet string in LWC
Hi Im removing html tags from a richtext input in order to make it a raw string, the string will be a code snippet. However I could not achieve it through using the standalone.js of prettier library. ...
0
votes
0
answers
118
views
Prettier, in VS Code, failing to format SOME VF Pages
I'm using Prettier, along with the plugin prettier-plugin-apex in VS Code, to format Salesforce classes and Visual Force pages etc.
It works (formats my docs on Save) most of the time, but now some, ...
0
votes
1
answer
194
views
How can I get `prettier` to properly format perm set XML files with `flowAccess`?
Our team is working with mock permission sets in our project for testing features. We have triggers to apply prettier when saving or committing files, and it's been breaking our perm set metadata ...
1
vote
0
answers
58
views
ESLint/prettier conflict when using cumulusci namespace placeholder in Apex
I am getting the below error when I run npm run prettier and when I commit (since I have a husky hook) a couple of Apex classes that use namespace placeholders .
Error: Found punctuation symbol or ...
2
votes
0
answers
135
views
Apex Naming Conventions Formatter
I'd like to auto format apex class/method/field names on pre-commit hook.
I'm looking for rules like PMD fieldnamingconventions but to be automatically formatted like Prettier can do.
https://pmd....
1
vote
0
answers
185
views
Prettier not autocompleting html class for LWC
I'm using MS Visual Studio Code the latest version. I'm on Java 18, the latest version. Latest NPM and have re-installed the Salesforce Extenstion Pack and re-installed Prettier. Originally I was ...
2
votes
1
answer
5k
views
Prettier Apex Plugin Won't Format Apex
UPDATE: I've been able to run prettier manually using
npx prettier --config .prettierrc --write .\force-app\main\default\classes
but I still cannot have it to work on save.
Hello everyone, I'm ...
0
votes
0
answers
1k
views
Formatting Visualforce Pages in VSCode on Save
can someone confirm how to get prettier working with visualforce pages on save in VSCode? I have tried in a fresh project but it never works.
Steps taken:
SFDX: Create Project
npm install
SFD: Create ...
3
votes
1
answer
5k
views
Prettier errors out when formatting Apex classes
I have prettier and prettier-plugin-apex node modules installed. Formatting LWC and JSON works fine with prettier but get the below error when formatting Apex files. Never had this issue on my old ...