Introduction
Introduction
What small-rules is, why it exists, and how it fits into the roblox-ts toolchain.
I made @pobammer-ts/small-rules for TypeScript projects that use roblox-ts and React Luau. It adds rules for the APIs and conventions that a general linter cannot 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?”I chose oxlint because it is a Rust-based linter with a native plugin API. That gives me a place to put roblox-ts-specific checks without rebuilding the project around ESLint compatibility. I would not claim every rule is useful to every project, but the ones here come from patterns I actually want called out.
Rule Categories
Section titled “Rule Categories”The rules are organized into 5 categories:
What I care about
Section titled “What I care about”- Use the native API: I want these rules to run as oxlint rules, not as an ESLint-shaped layer bolted on afterward.
- Know the platform:
Ianitor,Color3,UDim2,task.wait(), and React Luau components are not ordinary TypeScript patterns. A plugin for roblox-ts needs to understand that. - Keep configuration small: Most rules should work without options. I add configuration when a project genuinely needs a choice, not to make every rule look flexible.
- Fix the boring parts: Where a fix is safe, I would rather let
oxlint --fixhandle it than make someone rewrite the same cleanup by hand.
This project overlaps with general Oxlint rules in a few places. The point is not to replace those rules. It is to cover the roblox-ts and React Luau cases they cannot 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)