diff --git a/CLAUDE.md b/CLAUDE.md index 1cd57db..1f400ad 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -9,7 +9,8 @@ A collection of [ComputerCraft](https://tweaked.cc/) (CC:Tweaked) Lua APIs, serv ## Tooling constraints - **There is no way to run, build, or test this code yet.** It only executes inside ComputerCraft (in-game or under CraftOS-PC). Do not attempt to run Lua locally or add a test harness unless asked. -- A Lua linter will be added later. Until then, match the existing style (2-space indent, semicolons, `local function`). +- **Linting:** `just check` runs `luacheck` over all Lua source. **Always run `just check` after editing a Lua file, and fix any warnings before considering the change done.** Config lives in `.luacheckrc` (a custom `lua51+cc` std that knows the ComputerCraft sandbox globals and the `os`/`table` extensions). If a new genuine global is needed, add it there rather than suppressing the warning inline. +- Match the existing style (2-space indent, semicolons, `local function`). - `require` paths are ComputerCraft-resolved and absolute from the computer root, e.g. `require('/apis/net')`. Most modules return a *factory* function — call it once to get the API: `local net = require('/apis/net')()`. ## Architecture