Introduction
Introduction
What small-rules is, why it exists, and how it fits into the roblox-ts toolchain.
@pobammer-ts/small-rules is an oxlint-native lint plugin for TypeScript projects. It provides 90 custom rules that catch common mistakes, enforce consistent patterns, and improve code quality across TypeScript, React Luau, and Roblox-specific APIs.
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 fast, Rust-based linter for JavaScript and TypeScript. It runs orders of magnitude faster than ESLint while covering the most common linting needs. small-rules extends oxlint with domain-specific rules that understand roblox-ts patterns, React component conventions, and Roblox API idioms.
Rule Categories
Section titled “Rule Categories”The rules are organized into 4 categories:
Design Principles
Section titled “Design Principles”- Oxlint-native — Rules use the oxlint rule API, not ESLint compatibility layers. This means faster execution and better integration with oxlint’s diagnostic output.
- roblox-ts aware — Rules understand roblox-ts idioms like
Ianitor,Color3,UDim2,task.wait(), and React Luau components. - Minimal configuration — Most rules work with zero configuration. Options are available for rules that need them, but sensible defaults cover the common cases.
- Auto-fixable where safe — Many rules provide automatic fixes that can be applied with
oxlint --fix.
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)