Skip to content

All Rules

Look up a rule by name, by what it does, or by group. The full list still loads if JavaScript is off.

Showing 144 rules

Ban React Fc

React Rules
ban-react-fc

Ban React.FC and similar component type annotations. Use explicit function declarations instead.

  • Problem

Memoized Effect Dependencies

React Rules
memoized-effect-dependencies

Flags effect dependencies that are not memoized. Unmemoized dependencies can cause unnecessary re-renders or infinite loops.

  • Problem

No Cascading Set State

React Rules
no-cascading-set-state

Disallow effect hooks with many cascading state updates.

  • Problem

No Derived State

React Rules
no-derived-state

Disallow storing derived state in an effect.

  • Suggestion

No Chain State Updates

React Rules
no-chain-state-updates

Disallow chaining state changes in an effect.

  • Suggestion

No Event Handler

React Rules
no-event-handler

Disallow using state and an effect as an event handler.

  • Suggestion

No Adjust State On Prop Change

React Rules
no-adjust-state-on-prop-change

Disallow adjusting state in an effect when a prop changes.

  • Suggestion

No Jsx Spread Child

React Rules
no-jsx-spread-child

Disallow a spread in JSX child position.

  • Problem

No Nested Hook Calls

React Rules
no-nested-hook-calls

Disallow nesting a hook call inside another hook call.

  • Suggestion

No Reset All State On Prop Change

React Rules
no-reset-all-state-on-prop-change

Disallow resetting all state in an effect when a prop changes.

  • Suggestion

No Pass Live State To Parent

React Rules
no-pass-live-state-to-parent

Disallow passing live state to parents in an effect.

  • Suggestion

No Pass Data To Parent

React Rules
no-pass-data-to-parent

Disallow passing data to parents in an effect.

  • Suggestion

No External Store Subscription

React Rules
no-external-store-subscription

Disallow subscribing to an external store in an effect.

  • Suggestion

No Initialize State

React Rules
no-initialize-state

Disallow initializing state in an effect.

  • Suggestion

No Giant Component

React Rules
no-giant-component

Report React components whose bodies exceed 300 lines.

  • Problem

No God Components

React Rules
no-god-components

Enforce React component size and complexity limits inspired by the 'Refactor God Component' checklist.

  • Problem

No Inline Property On Memo Component

React Rules
no-inline-property-on-memo-component

Prevent inline properties from being passed to memoized components.

  • Problem

No New Instance In Use Memo

React Rules
no-new-instance-in-use-memo

Disallow configured constructor calls (default: new Instance) inside React useMemo callbacks.

  • Problem

No Render Helper Functions

React Rules
no-render-helper-functions

Disallow non-component functions that return JSX or React elements.

  • Suggestion

No Static React Create Element

React Rules
no-static-react-create-element

Require JSX for static React.createElement calls.

  • Problem

No Underscore React Props

React Rules
no-underscore-react-props

Ban React property names that begin with an underscore in JSX.

  • Problem

No Unused Use Memo

React Rules
no-unused-use-memo

Disallow standalone useMemo calls that ignore the memoized value.

  • Problem

No Use Memo Simple Expression

React Rules
no-use-memo-simple-expression

Disallow useMemo for expressions that are already trivial to compute.

  • Problem

No Useless Use Effect

React Rules
no-useless-use-effect

Disallow 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 Rules
no-useless-use-memo

Disallow useMemo calls that only wrap values static enough to live at module scope.

  • Suggestion

No Useless Use Spring

React Rules
no-useless-use-spring

Disallow useSpring hooks whose config and dependencies are entirely static

  • Suggestion

Prefer Constant Dispatch

React Rules
prefer-constant-dispatch

Disallow inline useReducer action objects that could be module-level constants.

  • Suggestion
  • Editor suggestions

Prefer Context Stack

React Rules
prefer-context-stack

Prefer a local ContextStack component over directly nesting multiple context providers.

  • Suggestion
  • Automatic fix

Prefer Direct Hook Imports

React Rules
prefer-direct-hook-imports

Prefer importing React hooks directly instead of calling them via the React namespace.

  • Suggestion

Prefer Hoisted Jsx Elements

React Rules
prefer-hoisted-jsx-elements

Prefer extracting static JSX elements to module-level constants.

  • Suggestion

Prefer Hoisted Jsx Object Properties

React Rules
prefer-hoisted-jsx-object-properties

Prefer extracting inline JSX object props to module-level constants when the entire object is statically hoistable.

  • Suggestion

Prefer Local Portal Component

React Rules
prefer-local-portal-component

Prefer a local Portal component over direct createPortal calls when the project already defines one.

  • Suggestion
  • Automatic fix

Prefer Padding Components

React Rules
prefer-padding-components

Prefer local EqualPadding and DirectionalPadding components over matching <uipadding /> declarations.

  • Suggestion
  • Automatic fix

Prefer Ternary Conditional Rendering

React Rules
prefer-ternary-conditional-rendering

Prefer ternary expressions over complementary JSX && branches.

  • Suggestion
  • Automatic fix

Prefer Use Reducer

React Rules
prefer-use-reducer

Suggest using useReducer for related state updates instead of multiple useState calls.

  • Problem

React Hooks Strict Return

React Rules
react-hooks-strict-return

Restrict React hooks to object returns or short tuples.

  • Suggestion

Require Named Effect Functions

React Rules
require-named-effect-functions

Enforce named effect functions for better debuggability. Prevents inline arrow functions in useEffect and similar hooks.

  • Problem
  • Automatic fix

Require React Component Keys

React Rules
require-react-component-keys

Require keys on nested React JSX children, fragments, and configured iteration or memoization contexts.

  • Problem

Require React Display Names

React Rules
require-react-display-names

Require displayName on exported memo components and contexts.

  • Problem

Require Tsx For Hooks

React Rules
require-tsx-for-hooks

Require React hooks to be declared in a .tsx file.

  • Problem

Rerender Memo With Default Value

React Rules
rerender-memo-with-default-value

Prevent inline empty object and array defaults in component prop destructuring.

  • Problem

Strict Component Boundaries

React Rules
strict-component-boundaries

Prevent imports that reach into another component's nested modules.

  • Problem

Use Exhaustive Dependencies

React Rules
use-exhaustive-dependencies

Enforce 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 Rules
use-hook-at-top-level

Enforce that React hooks are only called at the top level of components or custom hooks, never conditionally or in nested functions

  • Problem

No Has Before Remove In Jecs

Jecs Rules
no-has-before-remove-in-jecs

Disallow redundant Jecs World.has guards around World.remove calls.

  • Problem
  • Automatic fix

Prefer Membership Filter In Jecs

Jecs Rules
prefer-membership-filter-in-jecs

Move discarded Jecs query component values into a membership-only with filter.

  • Problem
  • Automatic fix

Prefer Single World Query In Jecs

Jecs Rules
prefer-single-world-query-in-jecs

Enforce combining multiple world.get() or world.has() calls into a single call for better Jecs performance.

  • Suggestion
  • Automatic fix

No Array Constructor Index Assignment

Roblox & Luau Rules
no-array-constructor-index-assignment

Disallow new Array<T>() followed by contiguous index assignments; use an array literal instead.

  • Suggestion
  • Automatic fix

Ban Instances

Roblox & Luau Rules
ban-instances

Ban specified Roblox Instance classes and configured Instance properties.

  • Problem

Enforce Ianitor Check Type

Roblox & Luau Rules
enforce-ianitor-check-type

Enforce Ianitor.Check<T> type annotations on complex TypeScript types

  • Problem

No Array Constructor Elements

Roblox & Luau Rules
no-array-constructor-elements

Disallow array constructor element forms and enforce roblox-ts-aware constructor patterns.

  • Problem
  • Automatic fix and editor suggestions

No Array Size Assignment

Roblox & Luau Rules
no-array-size-assignment

Disallow 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 Rules
no-async-in-system

Disallow yielding Roblox API calls in synchronous Planck system execution.

  • Problem

No Color3 Constructor

Roblox & Luau Rules
no-color3-constructor

Ban 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 Rules
no-events-in-events-callback

Disallow 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 Rules
no-ianitor-in-function-body

Disallow Ianitor validator creation inside function bodies. Hoist to module scope to avoid recreating validators on every call.

  • Problem

No Ianitor Success Access

Roblox & Luau Rules
no-ianitor-success-access

Disallow accessing .success on Ianitor check results when the full result object is not needed.

  • Suggestion

No Instance Methods Without This

Roblox & Luau Rules
no-instance-methods-without-this

Detect 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 Rules
no-native-properties-spread

Disallow 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 Rules
no-print

Use Log instead of print().

  • Problem

No Redundant Aspect Ratio Constraint

Roblox & Luau Rules
no-redundant-aspect-ratio-constraint

Disallow redundant uiaspectratioconstraint children inside components that already manage their own aspect ratio internally.

  • Problem

No Table Create Map

Roblox & Luau Rules
no-table-create-map

Disallow map(...) directly on table.create(...) and new Array(...) constructor patterns in roblox-ts.

  • Suggestion

No Task Wait

Roblox & Luau Rules
no-task-wait

Disallow task.wait() and Promise.delay(...).await() calls.

  • Problem

No Unsupported Syntax

Roblox & Luau Rules
no-unsupported-syntax

Disallow syntax that roblox-ts cannot compile to Luau.

  • Problem

No Useless Default

Roblox & Luau Rules
no-useless-default

Disallow Roblox JSX properties whose values already match the class defaults.

  • Suggestion
  • Automatic fix

No Warn

Roblox & Luau Rules
no-warn

Use Log instead of warn().

  • Problem

Prefer Idiv

Roblox & Luau Rules
prefer-idiv

Prefer .idiv() for integer division instead of math.floor(x / y) or math.floor(x * 0.5).

  • Suggestion
  • Automatic fix

Prefer Math Min Max

Roblox & Luau Rules
prefer-math-min-max

Prefer math.min() and math.max() over simple clamp-like ternaries.

  • Suggestion
  • Automatic fix

Prefer Modding Inspect

Roblox & Luau Rules
prefer-modding-inspect

Prefer Modding.inspect over manually enumerating every enum member in a Record<Enum, true>.

  • Suggestion
  • Automatic fix

Prefer Native Collection Copy

Roblox & Luau Rules
prefer-native-collection-copy

Prefer table.clone over a manual shallow Map or Set copy loop.

  • Problem
  • Automatic fix

Prefer Sequence Overloads

Roblox & Luau Rules
prefer-sequence-overloads

Prefer direct ColorSequence and NumberSequence overloads over identical direct arguments and two-keypoint arrays.

  • Suggestion
  • Automatic fix

Prefer Udim2 Shorthand

Roblox & Luau Rules
prefer-udim2-shorthand

Prefer 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 Rules
require-module-level-instantiation

Require configured classes to be instantiated at module level only.

  • Problem

Array Type Generic

Naming & Conventions
array-type-generic

Disallow bracket array type syntax and require Array<T> / ReadonlyArray<T>.

  • Problem
  • Automatic fix

Ban Types

Naming & Conventions
ban-types

Ban configured TypeScript utility types, defaulting to Omit in favor of Except.

  • Problem

No Inline Signature Types

Naming & Conventions
no-inline-signature-types

Disallow inline object types in parameter and return type annotations; declare a named interface instead.

  • Suggestion

No Spec File Extension

Naming & Conventions
no-spec-file-extension

Disallow the .spec.{ts,tsx} file extension for test files. Use .test.{ts,tsx} instead.

  • Problem

Prefer Optional Parameter

Naming & Conventions
prefer-optional-parameter

Disallow undefined in a function parameter's type union; declare the parameter optional with ? instead.

  • Problem
  • Automatic fix

Prefer Pascal Case Enums

Naming & Conventions
prefer-pascal-case-enums

Enforce PascalCase names for enums and enum members.

  • Suggestion

Require Async Suffix

Naming & Conventions
require-async-suffix

Require async function names to end with Async.

  • Problem

Consistent Compound Words

English
consistent-compound-words

Enforce consistent spelling of compound words in identifiers.

  • Suggestion

Prefer Singular Enums

English
prefer-singular-enums

Prefer singular naming for enums.

  • Suggestion

Prevent Abbreviations

English
prevent-abbreviations

Prevent abbreviations.

  • Suggestion
  • Automatic fix

Starts With Verb

English
starts-with-verb

Require function and method names to begin with a verb.

  • Suggestion

No Chained Type Assertions

Anti-Slop
no-chained-type-assertions

Disallow chained TypeScript as and angle-bracket assertions, including parenthesized chains.

  • Problem

No Conditional Empty Object Spread

Anti-Slop
no-conditional-empty-object-spread

Disallow object spreads that conditionally spread an empty object to omit fields.

  • Suggestion

No Known Value Widening

Anti-Slop
no-known-value-widening

Disallow syntactically established values from flowing into explicitly broad or anonymous target types that discard useful evidence.

  • Problem

No Module Mocking

Anti-Slop
no-module-mocking

Disallow Vitest and Jest module mocking; tests must replace dependencies through real interfaces.

  • Problem

No Object Parameters

Anti-Slop
no-object-parameters

Disallow object function parameters; inputs must use an owner-provided type and be parsed at their boundary.

  • Problem

No Reduce Accumulator Copy

Anti-Slop
no-reduce-accumulator-copy

Disallow copying growing reducer accumulators with Object.assign, Array.from, or array copy methods.

  • Problem

No Reflect Apply

Anti-Slop
no-reflect-apply

Disallow Reflect.apply; call typed functions directly or model dynamic dispatch behind an interface.

  • Problem

No Reflect Get

Anti-Slop
no-reflect-get

Disallow Reflect.get; use typed property access or parse dynamic input into a domain type.

  • Problem

No Runtime Typeof

Anti-Slop
no-runtime-typeof

Disallow runtime typeof checks; external values must be decoded into meaningful types at their I/O boundary.

  • Problem

No Shape In Symbol Names

Anti-Slop
no-shape-in-symbol-names

Disallow the case-insensitive substring "shape" in JavaScript, TypeScript, private, and JSX symbol names.

  • Problem

No Unknown Parameters

Anti-Slop
no-unknown-parameters

Disallow explicitly unknown function parameters except cause and the parameter named by a type predicate; decode unknown input at its I/O boundary instead.

  • Problem

No Unknown Returns

Anti-Slop
no-unknown-returns

Disallow functions whose explicit return contract is unknown or Promise<unknown>.

  • Problem

No Unknown Type Aliases

Anti-Slop
no-unknown-type-aliases

Disallow type aliases whose resolved type is unknown; unknown must remain visible at an allowed boundary.

  • Problem

No Unsafe Dictionary Type

Anti-Slop
no-unsafe-dictionary-type

Disallow object-dictionary contracts whose direct value type is unknown, any, object, {}, or a union/alias containing one of those escape hatches.

  • Problem

No Widen Then Assert

Anti-Slop
no-widen-then-assert

Disallow local const flows that explicitly widen a known value before asserting the widened binding to a narrower type.

  • Problem

Require Readable Spacing

Anti-Slop
require-readable-spacing

Require readable spacing between declarations and logical statement groups.

  • Suggestion
  • Automatic fix

Require Safety Comment For Type Assertion

Anti-Slop
require-safety-comment-for-type-assertion

Require a nearby safety-marker comment (or a described Oxlint suppression of typescript/no-unsafe-type-assertion) for every TypeScript type assertion except const assertions.

  • Problem

No Cliffy Action Wrapper

Cliffy Rules
no-cliffy-action-wrapper

Disallow Cliffy .action handlers that only forward their arguments to another function.

  • Suggestion
  • New

No Multiple Cliffy Commands

Cliffy Rules
no-multiple-cliffy-commands

Disallow defining more than one Cliffy command in a file.

  • Suggestion
  • New

Curly

General Logic & Style
curly

Require one brace style for each if, else, and loop body: one line for a lone if with a short body that fits, braces for every other body.

  • Suggestion
  • Automatic fix

No Real Temporary Directory

General Logic & Style
no-real-temporary-directory

Disallow real temp directories (os.tmpdir, fs.mkdtemp) in unit tests.

  • Problem

No Recursive

General Logic & Style
no-recursive

Disallow recursive function calls to prevent stack overflow.

  • Suggestion

Directive Disable Enable Pair

General Logic & Style
directive-disable-enable-pair

Require a matching enable comment for every oxlint-disable or eslint-disable block directive.

  • Suggestion

Directive No Aggregating Enable

General Logic & Style
directive-no-aggregating-enable

Disallow aggregating oxlint-enable or eslint-enable comments across multiple disable directives.

  • Suggestion

Directive No Duplicate Disable

General Logic & Style
directive-no-duplicate-disable

Disallow duplicate oxlint-disable or eslint-disable comments.

  • Problem

Directive No Restricted Disable

General Logic & Style
directive-no-restricted-disable

Disallow oxlint-disable or eslint-disable comments for configured rules.

  • Suggestion

Directive No Unlimited Disable

General Logic & Style
directive-no-unlimited-disable

Disallow oxlint-disable or eslint-disable comments without rule names.

  • Suggestion

Directive No Unused Enable

General Logic & Style
directive-no-unused-enable

Disallow unused oxlint-enable or eslint-enable comments.

  • Suggestion

Directive No Use

General Logic & Style
directive-no-use

Disallow block ESLint/Oxlint directive comments.

  • Suggestion

Directive Require Description

General Logic & Style
directive-require-description

Require descriptions for oxlint and eslint disable/enable directives.

  • Suggestion

No Async Constructor

General Logic & Style
no-async-constructor

Disallow 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 & Style
no-commented-code

Disallow commented-out code

  • Suggestion
  • Editor suggestions

No Constant Condition With Break

General Logic & Style
no-constant-condition-with-break

Disallow constant conditions, but allow constant loops that include loop exits such as break, return, or configured calls.

  • Problem

Isolated Functions

General Logic & Style
isolated-functions

Prevent usage of variables from outside the scope of isolated functions.

  • Problem

No Dead Store

General Logic & Style
no-dead-store

Disallow assignments whose value is never read.

  • Problem

No Discarded Rejection

General Logic & Style
no-discarded-rejection

Warn when a Promise rejection handler explicitly discards the failure and resolves to undefined.

  • Suggestion

No Error

General Logic & Style
no-error

Use throw instead of error().

  • Problem

No Filter Map Chain

General Logic & Style
no-filter-map-chain

Disallow Array.prototype.map(...) directly after Array.prototype.filter(...).

  • Suggestion

No Floating Point Equality

General Logic & Style
no-floating-point-equality

Disallow exact comparisons involving inexact floating-point values.

  • Problem

No Identity Map

General Logic & Style
no-identity-map

Disallow pointless identity Array.prototype.map() calls that return the parameter unchanged

  • Suggestion
  • Automatic fix

No Increment Decrement

General Logic & Style
no-increment-decrement

Disallow standalone ++ and -- statements and for-loop update clauses.

  • Suggestion
  • Automatic fix

No Loop Iterable Mutation

General Logic & Style
no-loop-iterable-mutation

Disallow mutating a loop iterable during iteration.

  • Problem

No Restricted Property Assignment

General Logic & Style
no-restricted-property-assignment

Disallow assignment to restricted object properties.

  • Problem

No Runtime In Type Files

General Logic & Style
no-runtime-in-type-files

Disallow runtime code in files that hold only types.

  • Problem

No Test Timeout

General Logic & Style
no-test-timeout

Disallow per-test timeouts in unit tests.

  • Suggestion

No Trivial Assertions

General Logic & Style
no-trivial-assertions

Disallow assertions that always succeed or compare against freshly created values.

  • Problem

No Unused Imports

General Logic & Style
no-unused-imports

Disallow unused imports

  • Problem
  • Automatic fix

No Use Of Empty Return Value

General Logic & Style
no-use-of-empty-return-value

Disallow using the return value of functions that do not return anything.

  • Problem

No Useless Constants

General Logic & Style
no-useless-constants

Disallow constants that do not add value.

  • Problem
  • Automatic fix

No Useless Empty String Comparison

General Logic & Style
no-useless-empty-string-comparison

Disallow equality comparisons against an empty-string literal.

  • Suggestion
  • Automatic fix and editor suggestions

No Variadic Spread

General Logic & Style
no-variadic-spread

Disallow spreading a potentially unbounded array into a variadic call, because every element becomes a stack-allocated argument.

  • Problem

Only Type Imports

General Logic & Style
only-type-imports

Require 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 & Style
prefer-class-properties

Prefer class properties to assignment of literals in constructors.

  • Suggestion

Prefer Early Return

General Logic & Style
prefer-early-return

Prefer early returns over full-body conditional wrapping.

  • Suggestion

Prefer Expect Assertions

General Logic & Style
prefer-expect-assertions

Enforce 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 & Style
prefer-module-scope-constants

Prefer screaming snake case constants at module scope or the allowed top-level wrapper scope.

  • Suggestion

Require Paired Calls

General Logic & Style
require-paired-calls

Enforces balanced opener/closer function calls across all execution paths

  • Problem

Require Switch Case Braces

General Logic & Style
require-switch-case-braces

Require braces around switch case bodies selected by line span or statement count.

  • Problem
  • Automatic fix

Require Throw Error Capture

General Logic & Style
require-throw-error-capture

Require 'Error.captureStackTrace' before directly throwing new Error instances in named functions.

  • Suggestion
  • Automatic fix

Require Unicode Regex

General Logic & Style
require-unicode-regex

Require the 'u' or 'v' unicode flag on calls named regex().

  • Problem