Skip to content

Configuration

Register the plugin in your .oxlintrc.json:

{
"jsPlugins": ["@pobammer-ts/small-rules"]
}

Each rule can be set to one of three severity levels:

Severity Behavior
"error" Fails the lint check
"warn" Shows a warning but does not fail
"off" Disables the rule
{
"rules": {
"small-rules/no-print": "error",
"small-rules/prefer-early-return": "warn",
"small-rules/no-useless-constants": "off"
}
}

Some rules accept options for customization. Pass them as an array where the first element is the severity and the second is an options object:

{
"rules": {
"small-rules/ban-instances": [
"error",
{
"ban": ["ScreenGui", "Frame"]
}
],
"small-rules/no-god-components": [
"error",
{
"maxLines": 200,
"maxProps": 8
}
]
}
}

Use oxlint’s overrides field to apply different rules to different file patterns:

{
"overrides": [
{
"files": ["**/*.test.ts"],
"rules": {
"small-rules/no-print": "off"
}
}
]
}

You can disable rules for specific lines using directive comments:

// oxlint-disable-next-line small-rules/no-print
print("Debug output");

Use oxlint-enable to re-enable:

/* oxlint-disable small-rules/no-print */
print("Debug 1");
print("Debug 2");
/* oxlint-enable small-rules/no-print */

For most roblox-ts projects, start with this baseline:

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