Introduction
Getting started
Introduction
What small-rules is, why it exists, and how it fits into the roblox-ts toolchain.
@pobammer-ts/small-rules is for TypeScript projects that use roblox-ts and React Luau. It adds rules for the APIs and conventions that a general linter can’t understand, while still using oxlint for the ordinary JavaScript and TypeScript work.
Use it with oxlint 1.69.0 or later, TypeScript 5 through 7, and Node.js ^20.19.0 or >=22.12.0.
Why oxlint?
Section titled “Why oxlint?”oxlint is a Rust-based linter with a native plugin API. That’s a place for roblox-ts-specific checks without rebuilding the project around ESLint compatibility. Not every rule is useful to every project, but the ones here come from patterns in real projects.
Rule categories
Section titled “Rule categories”The rules fall into 7 categories:
What matters here
Section titled “What matters here”- Use the native API: these rules run as oxlint rules, not as a layer shaped like
ESLintand bolted on afterward. - Know the platform:
Ianitor,Color3,UDim2,task.wait(), and React Luau components aren’t ordinary TypeScript patterns. A plugin for roblox-ts needs to understand that. - Small configuration: most rules should work without options. Add configuration when a project needs a choice, not to make every rule look flexible.
- Fix the boring parts: where a fix is safe, let
oxlint --fixhandle it instead of making someone rewrite the same cleanup by hand.
This project overlaps with general Oxlint rules in a few places. It covers the roblox-ts and React Luau cases those rules can’t reasonably know about.
Compatibility
Section titled “Compatibility”small-rules requires:
oxlint1.x. Developed and tested against 1.71.0- TypeScript
>=5 <8, for roblox-ts projects - Node.js
^20.19.0 || >=22.12.0 - An oxlint configuration file:
.oxlintrc.jsonoroxlint.config.ts