Skip to content
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

Add Prettier linting for Apex #8

Open
ndrewr opened this issue Feb 28, 2020 · 0 comments
Open

Add Prettier linting for Apex #8

ndrewr opened this issue Feb 28, 2020 · 0 comments

Comments

@ndrewr
Copy link
Contributor

ndrewr commented Feb 28, 2020

Production ready:

https://github.com/dangmai/prettier-plugin-apex

and note this is recommended by SF themselves but with some special config to allow for longer build time of Apex:

https://developer.salesforce.com/tools/vscode/en/user-guide/prettier/

Apex Prettier runs slower than most other formatters. In some cases formatting will not succeed because VS Code will time out the operation after 500ms. In order to ensure Apex code has enough time to format your documents we recommend changing the VS Code settings as follows.

{
  "editor.formatOnSaveTimeout": 5000
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant