removeWithoutHasJecs World.remove already handles an absent component.small-rules/no-has-before-remove-in-jecsDisallow redundant Jecs World.has guards around World.remove calls.
Jecs already allows World.remove when the entity doesn’t have the component. A matching World.has guard
adds branching without changing that result.
The rule follows world() imports from @rbxts/jecs; it doesn’t infer a World from a variable named
world. It reports matching guards even when repeated argument evaluation prevents a safe fix.
removeWithoutHasJecs World.remove already handles an absent component.This rule does not accept options.
import { world } from "@rbxts/jecs";const gameWorld = world();if (gameWorld.has(entity, Component)) { gameWorld.remove(entity, Component);}After auto-fix
import { world } from "@rbxts/jecs";const gameWorld = world();gameWorld.remove(entity, Component);import { world } from "@rbxts/jecs";const gameWorld = world();gameWorld.remove(entity, Component);