|
1 | 1 | # Instructions for sf-platform |
2 | 2 |
|
3 | | -This is a repo for multiple unlocked Salesforce packages |
| 3 | +This is a repo for multiple unlocked Salesforce packages. |
4 | 4 |
|
5 | | -We write most of our code in apex and lightning web components |
| 5 | +The code is written in apex and lightning web components |
6 | 6 |
|
7 | | -We use the styles outlined in the Prettier file .prettierrc and using Salesforce we prefer single quotes over double quotes |
| 7 | +Do not use SFDX commands only SF commands, sfdx is deprecated. |
8 | 8 |
|
9 | | -We use Flxble with the sfp CLI |
10 | | -We use Salesforce CLI with the sf commands, not the deprecated sfdx commands |
| 9 | +Prettier is used for styling and the settings are described in .prettierrc |
11 | 10 |
|
12 | | -When writing comments for classes and methods, use the @description tag |
| 11 | +Code can be found in the src and src-temp folders |
13 | 12 |
|
14 | | -Comments should include the @author tag and the name of the developer, xample "@author John Doe" based on the user.name in git Config |
| 13 | +When writing test always include System.Test.startTest(); and System.Test.stopTest();. First we prepare the data. The actual test should be placed in side start and stop test. Then we confirm the test results with asserts. |
15 | 14 |
|
16 | | -In comments the since tag should be written like this "@since version, current month current year" example: @since 0.1.0, March 2025 |
| 15 | +Tests are defined by the @IsTest annotation. |
| 16 | + |
| 17 | +When writing tests, the class we're testing often has the same filename as the test class except "Test" |
| 18 | + |
| 19 | +When assisting with code, use the sources listed below: |
| 20 | + |
| 21 | +- Apex developer guide: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dev_guide.htm |
| 22 | +- Apex reference guide: https://developer.salesforce.com/docs/atlas.en-us.254.0.apexref.meta/apexref/apex_ref_guide.htm |
| 23 | +- Salesforce web component library: https://developer.salesforce.com/docs/component-library/overview |
| 24 | +- Lightning web component developer guide: https://developer.salesforce.com/docs/platform/lwc/guide |
| 25 | +- Salesforce CLI Command reference: https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_top.htm |
| 26 | +- sfp CLI: https://docs.flxbl.io/flxbl/sfp |
0 commit comments