Configuration
Plugin Registration
Section titled “Plugin Registration”Register the plugin in your .oxlintrc.json:
{ "jsPlugins": ["@pobammer-ts/small-rules"]}Rule Severity
Section titled “Rule Severity”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" }}Rule Options
Section titled “Rule Options”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 } ] }}File-level Overrides
Section titled “File-level Overrides”Use oxlint’s overrides field to apply different rules to different file patterns:
{ "overrides": [ { "files": ["**/*.test.ts"], "rules": { "small-rules/no-print": "off" } } ]}Disabling Rules Inline
Section titled “Disabling Rules Inline”You can disable rules for specific lines using directive comments:
// oxlint-disable-next-line small-rules/no-printprint("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 */Recommended Configuration
Section titled “Recommended Configuration”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" }}