Skip to content

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.

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.

The rules fall into 7 categories:

  • Use the native API: these rules run as oxlint rules, not as a layer shaped like ESLint and 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 --fix handle 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.

small-rules requires:

  • oxlint 1.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.json or oxlint.config.ts