JSX Detection
Flags lowercase elements like <part /> which represent Roblox Instances.
Ban specific Roblox Instance classes in new Instance() and JSX.
Stops you from creating specific Roblox Instance classes. Configure the banned list and (optionally) attach a short reason so the error message tells people what to use instead.
Choose Targets
Select the Roblox Instance classes you want to restrict (e.g., Script, LocalScript, Frame).
Define Penalties Decide if you want a simple ban or an explanatory error message for your team.
Update Config Add the rule to your eslint.config.js using either the array or object format.
Verify JSX Ensure your JSX components use PascalCase (e.g., <Button />) to distinguish them from lowercase
Roblox Instances (e.g., <frame />).
Bans creation of instances specified in your configuration.
// If 'Part' and 'Script' are banned:const part = new Instance("Part");<script Source={...} />
// Also checks case-insensitive string literalsconst alsoPart = new Instance("part");Use modern or specialized instances that satisfy your project requirements.
const mesh = new Instance("MeshPart");<folder /><textlabel Text="Hello" />The rule accepts an object with a bannedInstances property, which can be an array or a map.
Just a list of strings. Uses a generic error message.
{ "bannedInstances": ["Part", "Frame", "Script"]}Provide a map where the key is the Instance and the value is the reason.
{ "bannedInstances": { "Part": "Use MeshPart instead for better performance", "Script": "Runtime script creation is a security risk" }}JSX Detection
Flags lowercase elements like <part /> which represent Roblox Instances.
Constructor Check
Inspects new Instance("Name") calls, even with complex expressions.
Case Insensitivity
Matches “Part”, “part”, and “PART” identically to avoid bypasses.
React Safety
Ignores PascalCase elements like <Part /> as they are React components.