wiki/contributing/formatting/code.md

41 lines
2.2 KiB
Markdown

---
title: Code Standards
description:
published: true
date: 2024-05-18T21:49:25.429Z
tags:
editor: markdown
dateCreated: 2024-05-16T22:18:45.623Z
---
# Use automated tools
When writing files which contribute to the Aux project, you should use [our standard formatting and linting tools for your language](/contributing/formatting/tools). If there is not a tool designated on that page, you should use the tool which is most commonly used for your language and add it to [our standard formatting and linting tools page](/contributing/formatting/tools).
> If your formatter or linter in default configuration disagrees with anything on this page, follow your formatter or linter. Ignore whatever guideline or guidelines on this page your linter has a differing default on.
{.is-warning}
> You should not configure your tools to accept the behavior on this page if they do not by default.
{.is-danger}
# Naming
If your formatter or linter does not specify which naming convention to use please follow:
- **Classes, interfaces, and other types should use `UpperCamelCase`**
- **Everything else, including functions and variables should use `lowerCamelCase`**
# Tabs
Because they allow different people to configure a different displayed width, please use **a single tab for indentation**.
# Semicolons
**Where semicolons are optional, please include them**. Not doing so can cause ambiguity in some cases, which can be hard to spot.
# ...And your favorite formatting difference...
If you come across a formatting choice that isn't covered, [please edit this page to add it](https://wiki.auxolotl.org/e/en/contributing/formatting/code). Please make any reasonable decision, it matters far more to be consistent than to be perfect.
If your formatting preference is one that tends to be flame-warred about, please remember to be nice, respectful, and follow [the code of conduct](/agreements/code-of-conduct).
If a formatting decision has been made against your preference, we're sorry. We still expect you to follow the decision for the sake of consistency. Please don't edit this page to change the decision. If you believe a decision on this page has been made in bad faith, please contact a member of the steering committee.