| # see https://github.com/CppCXY/EmmyLuaCodeStyle/blob/master/lua.template.editorconfig | |
| [*.lua] | |
| indent_style = space | |
| indent_size = 2 | |
| tab_width = 2 | |
| quote_style = single | |
| call_arg_parentheses = keep | |
| continuation_indent = 2 | |
| align_call_args = false | |
| align_function_params = true |
see https://pnpm.io/installation
$ pnpm --versioncorepack will NOT be distributed with Node.js v25>= https://nodejs.org/docs/latest-v24.x/api/corepack.html
Here's a comparison between how the same simple user definition would be defined using ArkType and Zod:
ArkType's definition syntax is more concise (definitions are about 50% shorter on average) as well as making it more visually obvious what the inferred TypeScript type will be. The ability to infer TypeScript definitions directly is the same, but ArkType's syntax is again more concise by allowing you to use typeof on a property of arkUser directly instead of using an extra "infer" helper.
In general, we also have taken significant steps to optimize and clarify our type hints when hovering over validators. For example, in the case above, this is what you see when you mouse over "zodUser":
| const std = @import("std"); | |
| fn encrypt(comptime string: []const u8) []const u8{ | |
| var new_string: [string.len]u8 = undefined; | |
| for (string) |chr, idx|{ | |
| new_string[idx] = chr ^ 0xff; | |
| } | |
| return &new_string; |
| @font-face { | |
| font-family: 'JetBrains Mono'; | |
| src: url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-Bold-Italic.woff2') format('woff2'), | |
| url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff/JetBrainsMono-Bold-Italic.woff') format('woff'); | |
| font-weight: 700; | |
| font-style: italic; | |
| font-display: swap; | |
| } | |
| @font-face { |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.

