Always use curly braces for conditional statements and loops, even for single-line bodies. This maintains consistency throughout the codebase and improves readability. Avoid inline conditionals.
Always use curly braces for conditional statements and loops, even for single-line bodies. This maintains consistency throughout the codebase and improves readability. Avoid inline conditionals.
Instead of:
if (areThereNoFileIn && this.fileIsRequired) return;
if (this.moduleTokenCache.has(key)) return this.moduleTokenCache.get(key);
Use:
if (areThereNoFileIn && this.fileIsRequired) {
return;
}
if (this.moduleTokenCache.has(key)) {
return this.moduleTokenCache.get(key);
}
This style:
Enter the URL of a public GitHub repository