- MUST: We use @antfu/ni. Use
nito install,nr SCRIPT_NAMEto run script,nunto uninstall package - MUST: Use TypeScript interfaces over types
- MUST: Use arrow functions over function declarations
- NEVER comment unless absolutely necessary.
- If it is a hack, such as a setTimeout or potentially confusing code, it should be prefixed with // HACK: reason for hack
- MUST: Use kebab-case for files
- MUST: Use descriptive names for variables (avoid shorthands, or 1-2 character names).
- Example: for .map(), you can use
innerXinstead ofx - Example: instead of
movedusedidPositionChange
- Example: for .map(), you can use
- MUST: Do not type cast ("as") unless absolutely necessary
- MUST: Keep interfaces or types on the global scope.
- MUST: Remove unused code and don't repeat yourself.