Skip to content

Quick Start

Getting started

Quick start

Install the plugin, add a few rules to .oxlintrc.json, and run your first lint.

Add small-rules and oxlint to your roblox-ts project as dev dependencies:

Terminal window
aube add -D @pobammer-ts/small-rules oxlint

Register the plugin in .oxlintrc.json, then enable the rules you want to try:

{
"jsPlugins": ["@pobammer-ts/small-rules"],
"rules": {
"small-rules/no-print": "error",
"small-rules/no-warn": "error",
"small-rules/ban-react-fc": "error",
"small-rules/no-task-wait": "error",
"small-rules/prefer-early-return": "warn"
}
}

Run the linter:

Terminal window
oxlint .

If you want a package script, add one to package.json:

{
"scripts": {
"lint": "oxlint"
}
}

Then run:

Terminal window
aube run lint

Some rules provide automatic fixes. Apply them with:

Terminal window
oxlint --fix