All Rules
Browse every rule by name, behavior, or category. All rules remain available when JavaScript is disabled.
Showing 90 rules
Ban React Fc
React Rulesban-react-fcBan React.FC and similar component type annotations. Use explicit function declarations instead.
- Problem
Memoized Effect Dependencies
React Rulesmemoized-effect-dependenciesFlags effect dependencies that are not memoized. Unmemoized dependencies can cause unnecessary re-renders or infinite loops.
- Problem
No Cascading Set State
React Rulesno-cascading-set-stateDisallow effect hooks with many cascading state updates.
- Problem
No Giant Component
React Rulesno-giant-componentReport React components whose bodies exceed 300 lines.
- Problem
No God Components
React Rulesno-god-componentsEnforce React component size and complexity limits inspired by the 'Refactor God Component' checklist.
- Problem
No Inline Property On Memo Component
React Rulesno-inline-property-on-memo-componentPrevent inline properties from being passed to memoized components.
- Problem
No New Instance In Use Memo
React Rulesno-new-instance-in-use-memoDisallow configured constructor calls (default: new Instance) inside React useMemo callbacks.
- Problem
No Render Helper Functions
React Rulesno-render-helper-functionsDisallow non-component functions that return JSX or React elements.
- Suggestion
No Static React Create Element
React Rulesno-static-react-create-elementRequire JSX for static React.createElement calls.
- Problem
No Underscore React Props
React Rulesno-underscore-react-propsBan React property names that begin with an underscore in JSX.
- Problem
No Unused Use Memo
React Rulesno-unused-use-memoDisallow standalone useMemo calls that ignore the memoized value.
- Problem
No Use Memo Simple Expression
React Rulesno-use-memo-simple-expressionDisallow useMemo for expressions that are already trivial to compute.
- Problem
No Useless Use Effect
React Rulesno-useless-use-effectDisallow empty effects, duplicate dependencies, effect chains, log-only effects, derived state, external-store state sync, state initialization, reset effects, parent notifications, parent ref callbacks, and event side effects routed through state.
- Suggestion
No Useless Use Memo
React Rulesno-useless-use-memoDisallow useMemo calls that only wrap values static enough to live at module scope.
- Suggestion
No Useless Use Spring
React Rulesno-useless-use-springDisallow useSpring hooks whose config and dependencies are entirely static
- Suggestion
Prefer Constant Dispatch
React Rulesprefer-constant-dispatchDisallow inline useReducer action objects that could be module-level constants.
- Suggestion
- Editor suggestions
Prefer Context Stack
React Rulesprefer-context-stackPrefer a local ContextStack component over directly nesting multiple context providers.
- Suggestion
- Automatic fix
Prefer Hoisted Jsx Elements
React Rulesprefer-hoisted-jsx-elementsPrefer extracting static Roblox JSX intrinsic elements to module-level constants.
- Suggestion
Prefer Hoisted Jsx Object Properties
React Rulesprefer-hoisted-jsx-object-propertiesPrefer extracting inline JSX object props to module-level constants when the entire object is statically hoistable.
- Suggestion
Prefer Local Portal Component
React Rulesprefer-local-portal-componentPrefer a local Portal component over direct createPortal calls when the project already defines one.
- Suggestion
- Automatic fix
Prefer Padding Components
React Rulesprefer-padding-componentsPrefer local EqualPadding and DirectionalPadding components over matching <uipadding /> declarations.
- Suggestion
- Automatic fix
Prefer Ternary Conditional Rendering
React Rulesprefer-ternary-conditional-renderingPrefer ternary expressions over complementary JSX && branches.
- Suggestion
- Automatic fix
Prefer Use Reducer
React Rulesprefer-use-reducerSuggest using useReducer for related state updates instead of multiple useState calls.
- Problem
React Hooks Strict Return
React Rulesreact-hooks-strict-returnRestrict React hooks to object returns or short tuples.
- Suggestion
Require Named Effect Functions
React Rulesrequire-named-effect-functionsEnforce named effect functions for better debuggability. Prevents inline arrow functions in useEffect and similar hooks.
- Problem
Require React Component Keys
React Rulesrequire-react-component-keysRequire keys on nested React JSX children, fragments, and configured iteration or memoization contexts.
- Problem
Require React Display Names
React Rulesrequire-react-display-namesRequire displayName on exported memo components and contexts.
- Problem
Rerender Memo With Default Value
React Rulesrerender-memo-with-default-valuePrevent inline empty object and array defaults in component prop destructuring.
- Problem
Strict Component Boundaries
React Rulesstrict-component-boundariesPrevent imports that reach into another component's nested modules.
- Problem
Use Exhaustive Dependencies
React Rulesuse-exhaustive-dependenciesEnforce exhaustive and correct dependency specification in React hooks to prevent stale closures and unnecessary re-renders
- Problem
- Automatic fix and editor suggestions
Use Hook At Top Level
React Rulesuse-hook-at-top-levelEnforce that React hooks are only called at the top level of components or custom hooks, never conditionally or in nested functions
- Problem
No Array Constructor Index Assignment
Roblox & Luau Rulesno-array-constructor-index-assignmentDisallow new Array<T>() followed by contiguous index assignments; use an array literal instead.
- Suggestion
- Automatic fix
Ban Instances
Roblox & Luau Rulesban-instancesBan specified Roblox Instance classes and configured Instance properties.
- Problem
Enforce Ianitor Check Type
Roblox & Luau Rulesenforce-ianitor-check-typeEnforce Ianitor.Check<T> type annotations on complex TypeScript types
- Problem
No Array Constructor Elements
Roblox & Luau Rulesno-array-constructor-elementsDisallow array constructor element forms and enforce roblox-ts-aware constructor patterns.
- Problem
- Automatic fix and editor suggestions
No Array Size Assignment
Roblox & Luau Rulesno-array-size-assignmentDisallow array append assignments using array[array.size()] = value (roblox-ts) or array[array.length] = value (standard) and prefer push-based appends.
- Problem
- Automatic fix
No Async In System
Roblox & Luau Rulesno-async-in-systemDisallow yielding Roblox API calls in synchronous Planck system execution.
- Problem
No Color3 Constructor
Roblox & Luau Rulesno-color3-constructorBan new Color3(...) except new Color3() or new Color3(0, 0, 0). Use Color3.fromRGB() instead.
- Problem
- Automatic fix
No Events In Events Callback
Roblox & Luau Rulesno-events-in-events-callbackDisallow sending Events back to the same player inside an Events.connect callback; use Functions for request/response.
- Problem
No Ianitor In Function Body
Roblox & Luau Rulesno-ianitor-in-function-bodyDisallow Ianitor validator creation inside function bodies. Hoist to module scope to avoid recreating validators on every call.
- Problem
No Ianitor Success Access
Roblox & Luau Rulesno-ianitor-success-accessDisallow accessing `.success` on Ianitor check results when the full result object is not needed.
- Suggestion
No Instance Methods Without This
Roblox & Luau Rulesno-instance-methods-without-thisDetect instance methods that do not use 'this' and suggest converting them to standalone functions for better performance in roblox-ts.
- Problem
No Native Properties Spread
Roblox & Luau Rulesno-native-properties-spreadDisallow spreading static property bags into nativeProperties/*NativeProperties props and onto JSX elements via intermediate objects, because the spread creates a new copied table every render.
- Problem
No Print
Roblox & Luau Rulesno-printUse Log instead of print().
- Problem
No Redundant Aspect Ratio Constraint
Roblox & Luau Rulesno-redundant-aspect-ratio-constraintDisallow redundant uiaspectratioconstraint children inside components that already manage their own aspect ratio internally.
- Problem
No Table Create Map
Roblox & Luau Rulesno-table-create-mapDisallow map(...) directly on table.create(...) and new Array(...) constructor patterns in roblox-ts.
- Suggestion
No Task Wait
Roblox & Luau Rulesno-task-waitDisallow task.wait() and Promise.delay(...).await() calls.
- Problem
No Useless Default
Roblox & Luau Rulesno-useless-defaultDisallow Roblox JSX properties whose values already match the class defaults.
- Suggestion
- Automatic fix
No Warn
Roblox & Luau Rulesno-warnUse Log instead of warn().
- Problem
Prefer Idiv
Roblox & Luau Rulesprefer-idivPrefer .idiv() for integer division instead of math.floor(x / y).
- Suggestion
- Automatic fix
Prefer Math Min Max
Roblox & Luau Rulesprefer-math-min-maxPrefer math.min() and math.max() over simple clamp-like ternaries.
- Suggestion
- Automatic fix
Prefer Modding Inspect
Roblox & Luau Rulesprefer-modding-inspectPrefer Modding.inspect over manually enumerating every enum member in a Record<Enum, true>.
- Suggestion
- Automatic fix
Prefer Sequence Overloads
Roblox & Luau Rulesprefer-sequence-overloadsPrefer direct ColorSequence and NumberSequence overloads over identical direct arguments and two-keypoint arrays.
- Suggestion
- Automatic fix
Prefer Single World Query
Roblox & Luau Rulesprefer-single-world-queryEnforce combining multiple world.get() or world.has() calls into a single call for better Jecs performance.
- Suggestion
- Automatic fix
Prefer Udim2 Shorthand
Roblox & Luau Rulesprefer-udim2-shorthandPrefer UDim2.fromScale() or UDim2.fromOffset() over new UDim2() when all offsets or all scales are zero.
- Suggestion
- Automatic fix
Require Module Level Instantiation
Roblox & Luau Rulesrequire-module-level-instantiationRequire configured classes to be instantiated at module level only.
- Problem
Array Type Generic
Naming & Conventionsarray-type-genericDisallow bracket array type syntax and require Array<T> / ReadonlyArray<T>.
- Problem
- Automatic fix
Ban Types
Naming & Conventionsban-typesBan configured TypeScript utility types, defaulting to Omit in favor of Except.
- Problem
No Spec File Extension
Naming & Conventionsno-spec-file-extensionDisallow the .spec.{ts,tsx} file extension for test files. Use .test.{ts,tsx} instead.
- Problem
Prefer Pascal Case Enums
Naming & Conventionsprefer-pascal-case-enumsEnforce PascalCase names for enums and enum members.
- Suggestion
Prefer Singular Enums
Naming & Conventionsprefer-singular-enumsPrefer singular naming for enums.
- Suggestion
Prevent Abbreviations
Naming & Conventionsprevent-abbreviationsPrevent abbreviations.
- Suggestion
- Automatic fix
Require Async Suffix
Naming & Conventionsrequire-async-suffixRequire async function names to end with Async.
- Problem
No Recursive
General Logic & Styleno-recursive<MISSING-DESCRIPTION>
- Suggestion
Directive Disable Enable Pair
General Logic & Styledirective-disable-enable-pairRequire a matching enable comment for every `oxlint-disable` or `eslint-disable` block directive.
- Suggestion
Directive No Aggregating Enable
General Logic & Styledirective-no-aggregating-enableDisallow aggregating `oxlint-enable` or `eslint-enable` comments across multiple disable directives.
- Suggestion
Directive No Duplicate Disable
General Logic & Styledirective-no-duplicate-disableDisallow duplicate `oxlint-disable` or `eslint-disable` comments.
- Problem
Directive No Restricted Disable
General Logic & Styledirective-no-restricted-disableDisallow `oxlint-disable` or `eslint-disable` comments for configured rules.
- Suggestion
Directive No Unlimited Disable
General Logic & Styledirective-no-unlimited-disableDisallow `oxlint-disable` or `eslint-disable` comments without rule names.
- Suggestion
Directive No Unused Enable
General Logic & Styledirective-no-unused-enableDisallow unused `oxlint-enable` or `eslint-enable` comments.
- Suggestion
Directive No Use
General Logic & Styledirective-no-useDisallow block ESLint/Oxlint directive comments.
- Suggestion
Directive Require Description
General Logic & Styledirective-require-descriptionRequire descriptions for `oxlint` and `eslint` disable/enable directives.
- Suggestion
No Async Constructor
General Logic & Styleno-async-constructorDisallow asynchronous operations inside class constructors. Constructors return immediately, so async work causes race conditions, unhandled rejections, and incomplete object states.
- Problem
No Commented Code
General Logic & Styleno-commented-codeDisallow commented-out code
- Suggestion
- Editor suggestions
No Constant Condition With Break
General Logic & Styleno-constant-condition-with-breakDisallow constant conditions, but allow constant loops that include loop exits such as break, return, or configured calls.
- Problem
No Error
General Logic & Styleno-errorUse throw instead of error().
- Problem
No Identity Map
General Logic & Styleno-identity-mapDisallow pointless identity `.map()` calls that return the parameter unchanged
- Suggestion
- Automatic fix
No Increment Decrement
General Logic & Styleno-increment-decrementDisallow standalone `++` and `--` statements and for-loop update clauses.
- Suggestion
- Automatic fix
No Restricted Property Assignment
General Logic & Styleno-restricted-property-assignmentDisallow assignment to restricted object properties.
- Problem
No Unused Imports
General Logic & Styleno-unused-importsDisallow unused imports
- Problem
- Automatic fix
No Useless Constants
General Logic & Styleno-useless-constantsDisallow constants that do not add value.
- Problem
- Automatic fix
Only Type Imports
General Logic & Styleonly-type-importsRequire all imports to be type-only imports. Benchmarks cannot import non-types because the benchmarker plugin will throw an error.
- Problem
Prefer Class Properties
General Logic & Styleprefer-class-propertiesPrefer class properties to assignment of literals in constructors.
- Suggestion
Prefer Early Return
General Logic & Styleprefer-early-returnPrefer early returns over full-body conditional wrapping.
- Suggestion
Prefer Expect Assertions
General Logic & Styleprefer-expect-assertionsEnforce expect assertion guards in tests and prefer expect.assertions(n) over expect.hasAssertions() when the count is known.
- Suggestion
- Automatic fix and editor suggestions
Prefer Module Scope Constants
General Logic & Styleprefer-module-scope-constantsPrefer screaming snake case constants at module scope or the allowed top-level wrapper scope.
- Suggestion
Require Paired Calls
General Logic & Stylerequire-paired-callsEnforces balanced opener/closer function calls across all execution paths
- Problem
Require Switch Case Braces
General Logic & Stylerequire-switch-case-bracesRequire braces around switch case bodies selected by line span or statement count.
- Problem
- Automatic fix
Require Throw Error Capture
General Logic & Stylerequire-throw-error-captureRequire 'Error.captureStackTrace' before directly throwing new Error instances in named functions.
- Suggestion
- Automatic fix
Require Unicode Regex
General Logic & Stylerequire-unicode-regexRequire the 'u' or 'v' unicode flag on calls named regex().
- Problem