Kavita/.github/copilot-instructions.md
2025-08-05 08:38:46 -05:00

750 B

Coding Guidelines

  • Anytime you don't use {} on an if statement, it must be on one line and MUST be a jump operation (return/continue/break). All other times, you must use {} and be on 2 lines.
  • Use var whenever possible
  • return statements should generally have a newline above them Examples:
# Case when okay - simple logic flow
var a = 2 + 3;
return a;

# Case when needs newline - complex logic is grouped together
var a = b + c;
_imageService.Resize(...);

return;
  • Operation (+,-,*, etc) should always have spaces around it; I.e. a + b not a+b.
  • Comma's , should always be followed by a space
  • When setting href directectly (not using Angulars routing) it should always be prefixed with baseURL