-
Notifications
You must be signed in to change notification settings - Fork 325
PR checklist
Milan Holemans edited this page Jul 20, 2023
·
18 revisions
- it builds
- all tests pass
- 100% coverage
- matches the spec
- command options follow the naming convention
- has correct name
- command class is named as follows [Service][Command]Command, eg. SpoWebRemoveCommand
- it works
- if it's a list command, it has a readable output in the text mode (ideally, each item fits in one row of 130 chars)
- command telemetry doesn't track PII
- doesn't contain commented-out code
- doesn't contain
any
types but instead uses specific types - if it's a remove command, does it have a confirm option
- if it's a bugfix, the PR contains a test for the use-case that's fixed
- doesn't retrieve form digest if not necessary
- if the request uses
responseType: 'json'
, failed promise is handled usinghandleRejectedODataJsonPromise
- escapes user input in XML and URL
- verbose and debug output are logged to stderr (
logger.logToStderr
instead oflogger.log
) - command doesn't do conditional output in JSON output mode in code. Instead, it defines default properties using the
defaultProperties
Command method - if it has multiple options where user is required to use either one, these options are defined using an optionSet and there is no specific validation logic in the command's validate method
- it has an md help page
- all code samples start with
m365
- has relevant examples
- examples use long names of options rather than short ones
- md help page is referenced in the toc
- md help page contains the marker to include global options rather than list them explicitly
- there are no warnings (lines that begin with
WARNING -
) when building docs - if it's a sample, the sample is properly formatted and indented
- has only one commit (if not squash)
- uses single quotes
' '
for strings - uses
async/await
instead ofpromise/then
- when working on
spo
commands, useGetFileByServerRelativePath
andGetFolderByServerRelativePath
API endpoint instead ofGetFileByServerRelativeUrl
andGetFolderByServerRelativeUrl
.