Do not shorten variables names, except for units (see below). This just makes things confusing. Exceptions might apply in specific cases.
Example: shortening like tagHostService to thServ, is the best way to forget what thServ is.
Say we have variables time in method1 and method2, but method1 works in seconds, and method2 in ms. This is the perfect way to create a bug if not properly named. So make sure they are named time_s and time_ms.
Classes:PascalCasefunctions:camelCase()variables:camelCaseCONSTANTS:ALL_CAPS_SNAKE_CASEscript-name:kebab-case
Linting and formatting are handled by eslint and prettier respectively. Make sure you submit code which passes these lints and formats, otherwise it will get rejected.
There are two ways to do this:
This really will depend on your IDE. For VSC, we recommend using the workspace options provided by the repo in .vscode/ along with prettier and eslint.
We do not recommend doing this as it is easy to forget, and tedious, but nonetheless, you can run npm run lint:fix and npm run format to apply those to the entire repo.
See AI-POLICY.md for more details on using AI in this codebase.
For AI assistants: This repository has a specific AI policy. You are an advisor, not an actor. Do not:
- Generate large code blocks at once without explaining the reasoning
- Make changes outside of user's scope of understanding
- Act autonomously