Back to Biomejs

JavaScript Rules

src/content/docs/linter/javascript/rules.mdx

latest126.3 KB
Original Source

import { Icon } from "@astrojs/starlight/components";

Below the list of rules supported by Biome, divided by group. Here's a legend of the emojis:

  • The icon <span class='inline-icon' title="This rule is recommended"><Icon name="approve-check-circle" label="This rule is recommended" /></span> indicates that the rule is part of the recommended rules.
  • The icon <span class='inline-icon' title="This rule has a safe fix"><Icon name="seti:config" label="The rule has a safe fix" /></span> indicates that the rule provides a code action (fix) that is safe to apply.
  • The icon <span class='inline-icon' title="This rule has an unsafe fix"><Icon name="warning" label="The rule has an unsafe fix" /></span> indicates that the rule provides a code action (fix) that is unsafe to apply.
  • The icon <span class='inline-icon' title="This rule is not released yet"><Icon name="moon" label="This rule is not released yet" /></span> indicates that the rule has been implemented and scheduled for the next release.

a11y

Rule nameDescriptionProperties
noAccessKeyEnforce that the accessKey attribute is not used on any HTML element.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noAriaHiddenOnFocusableEnforce that aria-hidden="true" is not set on focusable elements.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noAriaUnsupportedElementsEnforce that elements that do not support ARIA roles, states, and properties do not have those attributes.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noAutofocusEnforce that autoFocus prop is not used on elements.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noDistractingElementsEnforces that no distracting elements are used.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noHeaderScopeThe scope prop should be used only on <th> elements.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noInteractiveElementToNoninteractiveRoleEnforce that non-interactive ARIA roles are not assigned to interactive HTML elements.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noLabelWithoutControlEnforce that a label element or component has a text label and an associated input.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noNoninteractiveElementInteractionsDisallow use event handlers on non-interactive elements.
noNoninteractiveElementToInteractiveRoleEnforce that interactive ARIA roles are not assigned to non-interactive HTML elements.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noNoninteractiveTabindexEnforce that tabIndex is not assigned to non-interactive HTML elements.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noPositiveTabindexPrevent the usage of positive integers on tabIndex property<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noRedundantAltEnforce img alt prop does not contain the word "image", "picture", or "photo".<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noRedundantRolesEnforce explicit role property is not the same as implicit/default role property on an element.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noStaticElementInteractionsEnforce that static, visible elements (such as <div>) that have click handlers use the valid role attribute.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noSvgWithoutTitleEnforces the usage of the title element for the svg element.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useAltTextEnforce that all elements that require alternative text have meaningful information to relay back to the end user.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useAnchorContentEnforce that anchors have content and that the content is accessible to screen readers.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useAriaActivedescendantWithTabindexEnforce that tabIndex is assigned to non-interactive HTML elements with aria-activedescendant.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useAriaPropsForRoleEnforce that elements with ARIA roles must have all required ARIA attributes for that role.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useAriaPropsSupportedByRoleEnforce that ARIA properties are valid for the roles that are supported by the element.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useButtonTypeEnforces the usage of the attribute type for the element button<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useFocusableInteractiveElements with an interactive role and interaction handlers must be focusable.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useHeadingContentEnforce that heading elements (h1, h2, etc.) have content and that the content is accessible to screen readers. Accessible means that it is not hidden using the aria-hidden prop.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useHtmlLangEnforce that html element has lang attribute.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useIframeTitleEnforces the usage of the attribute title for the element iframe.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useKeyWithClickEventsEnforce onClick is accompanied by at least one of the following: onKeyUp, onKeyDown, onKeyPress.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useKeyWithMouseEventsEnforce onMouseOver / onMouseOut are accompanied by onFocus / onBlur.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useMediaCaptionEnforces that audio and video elements must have a track for captions.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useSemanticElementsIt detects the use of role attributes in JSX elements and suggests using semantic elements instead.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useValidAnchorEnforce that all anchors are valid, and they are navigable elements.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useValidAriaPropsEnsures that ARIA properties aria-* are all valid.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useValidAriaRoleElements with ARIA roles must use a valid, non-abstract ARIA role.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useValidAriaValuesEnforce that ARIA state and property values are valid.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useValidAutocompleteUse valid values for the autocomplete attribute on input elements.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useValidLangEnsure that the attribute passed to the lang attribute is a correct ISO language and/or country.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>

complexity

Rule nameDescriptionProperties
noAdjacentSpacesInRegexDisallow unclear usage of consecutive space characters in regular expression literals<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noArgumentsDisallow the use of arguments.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noBannedTypesDisallow primitive type aliases and misleading types.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noCommaOperatorDisallow comma operator.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noEmptyTypeParametersDisallow empty type parameters in type aliases and interfaces.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noExcessiveCognitiveComplexityDisallow functions that exceed a given Cognitive Complexity score.
noExcessiveLinesPerFunctionRestrict the number of lines of code in a function.
noExcessiveNestedTestSuitesThis rule enforces a maximum depth to nested describe() in test files.
noExtraBooleanCastDisallow unnecessary boolean casts<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noFlatMapIdentityDisallow to use unnecessary callback on flatMap.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noForEachPrefer for...of statement instead of Array.forEach.
noImplicitCoercionsDisallow shorthand type conversions.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noStaticOnlyClassThis rule reports when a class has no non-static members, such as for a class used exclusively as a static namespace.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noThisInStaticDisallow this and super in static contexts.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noUselessCatchDisallow unnecessary catch clauses.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noUselessCatchBindingDisallow unused catch bindings.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noUselessConstructorDisallow unnecessary constructors.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noUselessContinueAvoid using unnecessary continue.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noUselessEmptyExportDisallow empty exports that don't change anything in a module file.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noUselessEscapeInRegexDisallow unnecessary escape sequence in regular expression literals.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noUselessFragmentsDisallow unnecessary fragments<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noUselessLabelDisallow unnecessary labels.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noUselessLoneBlockStatementsDisallow unnecessary nested block statements.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noUselessRenameDisallow renaming import, export, and destructured assignments to the same name.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noUselessStringConcatDisallow unnecessary concatenation of string or template literals.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noUselessStringRawDisallow unnecessary String.raw function in template string literals without any escape sequence.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noUselessSwitchCaseDisallow useless case in switch statements.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noUselessTernaryDisallow ternary operators when simpler alternatives exist.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noUselessThisAliasDisallow useless this aliasing.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noUselessTypeConstraintDisallow using any or unknown as type constraint.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noUselessUndefinedDisallow the use of useless undefined.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noUselessUndefinedInitializationDisallow initializing variables to undefined.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noVoidDisallow the use of void operators, which is not a familiar operator.
useArrowFunctionUse arrow functions over function expressions.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useDateNowUse Date.now() to get the number of milliseconds since the Unix Epoch.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useFlatMapPromotes the use of .flatMap() when map().flat() are used together.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useIndexOfPrefer Array#{indexOf,lastIndexOf}() over Array#{findIndex,findLastIndex}() when looking for the index of an item.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useLiteralKeysEnforce the usage of a literal access to properties over computed property access.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useMaxParamsEnforce a maximum number of parameters in function definitions.
useNumericLiteralsDisallow parseInt() and Number.parseInt() in favor of binary, octal, and hexadecimal literals<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useOptionalChainEnforce using concise optional chain instead of chained logical expressions.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useRegexLiteralsEnforce the use of the regular expression literals instead of the RegExp constructor if possible.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useSimpleNumberKeysDisallow number literal object member names which are not base 10 or use underscore as separator.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useSimplifiedLogicExpressionDiscard redundant terms from logical expressions.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useWhileEnforce the use of while loops instead of for loops when the initializer and update expressions are not needed.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>

correctness

Rule nameDescriptionProperties
noChildrenPropPrevent passing of children as props.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noConstAssignPrevents from having const variables being re-assigned.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noConstantConditionDisallow constant expressions in conditions<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noConstantMathMinMaxClampDisallow the use of Math.min and Math.max to clamp a value where the result itself is constant.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noConstructorReturnDisallow returning a value from a constructor.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noEmptyCharacterClassInRegexDisallow empty character classes in regular expression literals.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noEmptyPatternDisallows empty destructuring patterns.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noGlobalDirnameFilenameDisallow the use of __dirname and __filename in the global scope.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noGlobalObjectCallsDisallow calling global object properties as functions<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noInnerDeclarationsDisallow function and var declarations that are accessible outside their block.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noInvalidBuiltinInstantiationEnsure that builtins are correctly instantiated.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noInvalidConstructorSuperPrevents the incorrect use of super() inside classes. It also checks whether a call super() is missing from classes that extends other constructors.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noInvalidUseBeforeDeclarationDisallow the use of variables, function parameters, classes, and enums before their declaration<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noNestedComponentDefinitionsDisallows defining React components inside other components.
noNextAsyncClientComponentPrevent client components from being async functions.
noNodejsModulesForbid the use of Node.js builtin modules.
noNonoctalDecimalEscapeDisallow \8 and \9 escape sequences in string literals.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noPrecisionLossDisallow literal numbers that lose precision<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noPrivateImportsRestrict imports of private exports.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noProcessGlobalDisallow the use of process global.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noQwikUseVisibleTaskDisallow useVisibleTask$() functions in Qwik components.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noReactPropAssignmentsDisallow assigning to React component props.
noRenderReturnValuePrevent the usage of the return value of React.render.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noRestrictedElementsDisallow the use of configured elements.
noSelfAssignDisallow assignments where both sides are exactly the same.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noSetterReturnDisallow returning a value from a setter<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noSolidDestructuredPropsDisallow destructuring props inside JSX components in Solid projects.
noStringCaseMismatchDisallow comparison of expressions modifying the string case with non-compliant value.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noSwitchDeclarationsDisallow lexical declarations in switch clauses.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noUndeclaredDependenciesDisallow the use of dependencies that aren't specified in the package.json.
noUndeclaredVariablesPrevents the usage of variables that haven't been declared inside the document.
noUnreachableDisallow unreachable code<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noUnreachableSuperEnsures the super() constructor is called exactly once on every code path in a class constructor before this is accessed if the class has a superclass<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noUnresolvedImportsWarn when importing non-existing exports.
noUnsafeFinallyDisallow control flow statements in finally blocks.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noUnsafeOptionalChainingDisallow the use of optional chaining in contexts where the undefined value is not allowed.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noUnusedFunctionParametersDisallow unused function parameters.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noUnusedImportsDisallow unused imports.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noUnusedLabelsDisallow unused labels.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noUnusedPrivateClassMembersDisallow unused private class members<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noUnusedVariablesDisallow unused variables.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noVoidElementsWithChildrenThis rules prevents void elements (AKA self-closing elements) from having children.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noVoidTypeReturnDisallow returning a value from a function with the return type 'void'<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noVueDataObjectDeclarationEnforce that Vue component data options are declared as functions.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noVueDuplicateKeysDisallow duplicate keys in Vue component data, methods, computed properties, and other options.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noVueReservedKeysDisallow reserved keys in Vue component data and computed properties.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noVueReservedPropsDisallow reserved names to be used as props.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noVueSetupPropsReactivityLossDisallow destructuring of props passed to setup in Vue projects.
useExhaustiveDependenciesEnforce correct dependency usage within React hooks.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useHookAtTopLevelEnforce that all React hooks are being called from the Top Level component functions.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useImageSizeEnforces that `` elements have both width and height attributes.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useImportExtensionsEnforce file extensions for relative imports.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useIsNanRequire calls to isNaN() when checking for NaN.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useJsonImportAttributesEnforces the use of with { type: "json" } for JSON module imports.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useJsxKeyInIterableDisallow missing key props in iterators/collection literals.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useParseIntRadixEnforce the consistent use of the radix argument when using parseInt().<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useQwikClasslistPrefer using the class prop as a classlist over the classnames helper.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useQwikMethodUsageDisallow use* hooks outside of component$ or other use* hooks in Qwik applications.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useQwikValidLexicalScopeDisallow unserializable expressions in Qwik dollar ($) scopes.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useSingleJsDocAsteriskEnforce JSDoc comment lines to start with a single asterisk, except for the first one.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useUniqueElementIdsPrevent the usage of static string literal id attribute on elements.
useValidForDirectionEnforce "for" loop update clause moving the counter in the right direction.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useValidTypeofThis rule checks that the result of a typeof expression is compared to a valid value.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useYieldRequire generator functions to contain yield.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>

nursery

Rule nameDescriptionProperties
noAmbiguousAnchorTextDisallow ambiguous anchor descriptions.
noBeforeInteractiveScriptOutsideDocumentPrevent usage of next/script's beforeInteractive strategy outside of pages/_document.js in a Next.js project.
noConditionalExpectDisallow conditional expect() calls inside tests.
noContinueDisallow continue statements.
noDivRegexDisallow equal signs explicitly at the beginning of regular expressions.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noDuplicateEnumValuesDisallow duplicate enum member values.
noDuplicatedSpreadPropsDisallow JSX prop spreading the same identifier multiple times.
noEqualsToNullRequire the use of === or !== for comparison with null.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noExcessiveClassesPerFileEnforce a maximum number of classes per file.
noExcessiveLinesPerFileRestrict the number of lines in a file.
noFloatingClassesDisallow new operators outside of assignments or comparisons.
noFloatingPromisesRequire Promise-like statements to be handled appropriately.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noForInDisallow iterating using a for-in loop.
noIncrementDecrementDisallows the usage of the unary operators ++ and --.
noJsxPropsBindDisallow .bind(), arrow functions, or function expressions in JSX props
noLeakedRenderPrevent problematic leaked values from being rendered.
noMisusedPromisesDisallow Promises to be used in places where they are almost certainly a<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noMultiAssignDisallow use of chained assignment expressions
noMultiStrDisallow creating multiline strings by escaping newlines.
noNestedPromisesDisallow nested .then() or .catch() promise calls.
noParametersOnlyUsedInRecursionDisallow function parameters that are only used in recursive calls.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noPlaywrightElementHandleDisallow usage of element handles (page.$() and page.$$()).<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noPlaywrightEvalDisallow usage of page.$eval() and page.$$eval().
noPlaywrightForceOptionDisallow usage of the { force: true } option.
noPlaywrightMissingAwaitEnforce Playwright async APIs to be awaited or returned.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noPlaywrightNetworkidleDisallow usage of the networkidle option.
noPlaywrightPagePauseDisallow using page.pause().
noPlaywrightUselessAwaitDisallow unnecessary await for Playwright methods that don't return promises.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noPlaywrightWaitForNavigationDisallow using page.waitForNavigation().
noPlaywrightWaitForSelectorDisallow using page.waitForSelector().<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noPlaywrightWaitForTimeoutDisallow using page.waitForTimeout().
noProtoDisallow the use of the deprecated __proto__ object property.
noRedundantDefaultExportChecks if a default export exports the same symbol as a named export.
noReturnAssignDisallow assignments in return statements.
noScriptUrlDisallow javascript: URLs.
noShadowDisallow variable declarations from shadowing variables declared in the outer scope.
noSyncScriptsPrevent the usage of synchronous scripts.
noTernaryDisallow ternary operators.
noUndeclaredEnvVarsDisallow the use of undeclared environment variables.
noUnknownAttributeDisallow unknown DOM properties.
noUnnecessaryConditionsDisallow unnecessary type-based conditions that can be statically determined as redundant.
noUselessReturnDisallow redundant return statements.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noVueArrowFuncInWatchDisallows using arrow functions when defining a watcher.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noVueOptionsApiDisallow the use of Vue Options API.
noVueRefAsOperandDisallow the use of value wrapped by ref()(Composition API) as operand
useArraySomePrefer Array.prototype.some() over verbose existence checks.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useArraySortCompareRequire Array#sort and Array#toSorted calls to always provide a compareFunction.
useAwaitThenableEnforce that await is only used on Promise values.
useConsistentEnumValueTypeDisallow enums from having both number and string members.
useConsistentMethodSignaturesEnforce consistent use of either method signatures or function properties within interfaces and type aliases.
useDestructuringRequire destructuring from arrays and/or objects
useErrorCauseEnforce that new Error() is thrown with the original error as cause.
useExhaustiveSwitchCasesRequire switch-case statements to be exhaustive.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useExpectEnsure that test functions contain at least one expect() or similar assertion.
useExplicitTypeEnforce types in functions, methods, variables, and parameters.
useFindEnforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result.
useGlobalThisEnforce the use of globalThis over window, self, and global.
useImportsFirstEnforce that all imports appear at the top of the module.<span class='inline-icon' title="This rule is not released yet"><Icon name="moon" label="This rule is not released yet" size="1.2rem" /></span>
useInlineScriptIdEnforce id attribute on next/script components with inline content or dangerouslySetInnerHTML.
useNamedCaptureGroupEnforce using named capture groups in regular expression.
useNullishCoalescingEnforce using the nullish coalescing operator (??) instead of logical or (`
usePlaywrightValidDescribeCallbackEnforce valid describe() callback.
useRegexpExecEnforce RegExp#exec over String#match if no global flag is provided.
useSortedClassesEnforce the sorting of CSS utility classes.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useSpreadEnforce the use of the spread operator over .apply().<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useUnicodeRegexEnforce the use of the u or v flag for regular expressions.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useVueConsistentDefinePropsDeclarationEnforce consistent defineProps declaration style.
useVueDefineMacrosOrderEnforce specific order of Vue compiler macros.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useVueMultiWordComponentNamesEnforce multi-word component names in Vue components.

performance

Rule nameDescriptionProperties
noAccumulatingSpreadDisallow the use of spread (...) syntax on accumulators.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noAwaitInLoopsDisallow await inside loops.
noBarrelFileDisallow the use of barrel file.
noDeleteDisallow the use of the delete operator.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noDynamicNamespaceImportAccessDisallow accessing namespace imports dynamically.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noImgElementPrevent usage of `` element in a Next.js project.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noNamespaceImportDisallow the use of namespace imports.
noReExportAllAvoid re-export all.
noUnwantedPolyfillioPrevent duplicate polyfills from Polyfill.io.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useGoogleFontPreconnectEnsure the preconnect attribute is used when using Google Fonts.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useSolidForComponentEnforce using Solid's <For /> component for mapping an array to JSX elements.
useTopLevelRegexRequire regex literals to be declared at the top level.

security

Rule nameDescriptionProperties
noBlankTargetDisallow target="_blank" attribute without rel="noopener".<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noDangerouslySetInnerHtmlPrevent the usage of dangerous JSX props<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noDangerouslySetInnerHtmlWithChildrenReport when a DOM element or a component uses both children and dangerouslySetInnerHTML prop.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noGlobalEvalDisallow the use of global eval().<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noSecretsDisallow usage of sensitive data such as API keys and tokens.

style

Rule nameDescriptionProperties
noCommonJsDisallow use of CommonJs module system in favor of ESM style imports.
noDefaultExportDisallow default exports.
noDoneCallbackDisallow using a callback in asynchronous tests and hooks.
noEnumDisallow TypeScript enum.
noExportedImportsDisallow exporting an imported variable.
noHeadElementPrevent usage of <head> element in a Next.js project.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noImplicitBooleanDisallow implicit true values on JSX boolean attributes<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noInferrableTypesDisallow type annotations for variables, parameters, and class properties initialized with a literal expression.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noJsxLiteralsDisallow string literals inside JSX elements.
noMagicNumbersReports usage of "magic numbers" — numbers used directly instead of being assigned to named constants.
noNamespaceDisallow the use of TypeScript's namespaces.
noNegationElseDisallow negation in the condition of an if statement if it has an else clause.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noNestedTernaryDisallow nested ternary expressions.
noNonNullAssertionDisallow non-null assertions using the ! postfix operator.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noParameterAssignDisallow reassigning function parameters.
noParameterPropertiesDisallow the use of parameter properties in class constructors.
noProcessEnvDisallow the use of process.env.
noRestrictedGlobalsThis rule allows you to specify global variable names that you don’t want to use in your application.
noRestrictedImportsDisallow specified modules when loaded by import or require.
noRestrictedTypesDisallow user defined types.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noShoutyConstantsDisallow the use of constants which its value is the upper-case version of its name.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noSubstrEnforce the use of String.slice() over String.substr() and String.substring().<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noUnusedTemplateLiteralDisallow template literals if interpolation and special-character handling are not needed<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noUselessElseDisallow else block when the if block breaks early.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noYodaExpressionDisallow the use of yoda expressions.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useArrayLiteralsDisallow Array constructors.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useAsConstAssertionEnforce the use of as const over literal type and type annotation.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useAtIndexUse at() instead of integer index access.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useBlockStatementsRequires following curly brace conventions.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useCollapsedElseIfEnforce using else if instead of nested if in else clauses.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useCollapsedIfEnforce using single if instead of nested if clauses.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useComponentExportOnlyModulesEnforce declaring components only within modules that export React Components exclusively.
useConsistentArrayTypeRequire consistently using either T[] or Array<T><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useConsistentArrowReturnEnforce consistent arrow function bodies.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useConsistentBuiltinInstantiationEnforce the use of new for all builtins, except String, Number and Boolean.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useConsistentCurlyBracesThis rule enforces consistent use of curly braces inside JSX attributes and JSX children.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useConsistentMemberAccessibilityRequire consistent accessibility modifiers on class properties and methods.
useConsistentObjectDefinitionsRequire the consistent declaration of object literals. Defaults to explicit definitions.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useConsistentTypeDefinitionsEnforce type definitions to consistently use either interface or type.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useConstRequire const declarations for variables that are only assigned once.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useDefaultParameterLastEnforce default function parameters and optional function parameters to be last.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useDefaultSwitchClauseRequire the default clause in switch statements.
useEnumInitializersRequire that each enum member value be explicitly initialized.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useExplicitLengthCheckEnforce explicitly comparing the length, size, byteLength or byteOffset property of a value.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useExponentiationOperatorDisallow the use of Math.pow in favor of the ** operator.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useExportTypePromotes the use of export type for types.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useExportsLastRequire that all exports are declared after all non-export statements.
useFilenamingConventionEnforce naming conventions for JavaScript and TypeScript filenames.
useForOfPrefer using for...of loops over standard for loops where possible.
useFragmentSyntaxThis rule enforces the use of <>...</> over <Fragment>...</Fragment>.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useGroupedAccessorPairsEnforce that getters and setters for the same property are adjacent in class and object definitions.
useImportTypePromotes the use of import type for types.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useLiteralEnumMembersRequire all enum members to be literal values.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useNamingConventionEnforce naming conventions for everything across a codebase.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useNodeAssertStrictPromotes the usage of node:assert/strict over node:assert.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useNodejsImportProtocolEnforces using the node: protocol for Node.js builtin modules.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useNumberNamespaceUse the Number properties instead of global ones.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useNumericSeparatorsEnforce the use of numeric separators in numeric literals.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useObjectSpreadPrefer object spread over Object.assign() when constructing new objects.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useReactFunctionComponentsEnforce that components are defined as functions and never as classes.
useReadonlyClassPropertiesEnforce marking members as readonly if they are never modified outside the constructor.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useSelfClosingElementsPrevent extra closing tags for components without children.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useShorthandAssignRequire assignment operator shorthand where possible.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useShorthandFunctionTypeEnforce using function types instead of object type with call signatures.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useSingleVarDeclaratorDisallow multiple variable declarations in the same variable statement<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useSymbolDescriptionRequire a description parameter for the Symbol().
useTemplatePrefer template literals over string concatenation.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useThrowNewErrorRequire new when throwing an error.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useThrowOnlyErrorDisallow throwing non-Error values.
useTrimStartEndEnforce the use of String.trimStart() and String.trimEnd() over String.trimLeft() and String.trimRight().<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useUnifiedTypeSignaturesDisallow overload signatures that can be unified into a single signature.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>

suspicious

Rule nameDescriptionProperties
noAlertDisallow the use of alert, confirm, and prompt.
noApproximativeNumericConstantUse standard constants instead of approximated literals.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noArrayIndexKeyDiscourage the usage of Array index in keys.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noAssignInExpressionsDisallow assignments in expressions.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noAsyncPromiseExecutorDisallows using an async function as a Promise executor.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noBitwiseOperatorsDisallow bitwise operators.
noCatchAssignDisallow reassigning exceptions in catch clauses.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noClassAssignDisallow reassigning class members.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noCommentTextPrevent comments from being inserted as text nodes<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noCompareNegZeroDisallow comparing against -0<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noConfusingLabelsDisallow labeled statements that are not loops.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noConfusingVoidTypeDisallow void type outside of generic or return types.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noConsoleDisallow the use of console.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noConstEnumDisallow TypeScript const enum<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noConstantBinaryExpressionsDisallow expressions where the operation doesn't affect the value
noControlCharactersInRegexPrevents from having control characters and some escape sequences that match control characters in regular expression literals.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noDebuggerDisallow the use of debugger<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noDeprecatedImportsRestrict imports of deprecated exports.
noDocumentCookieDisallow direct assignments to document.cookie.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noDocumentImportInPagePrevents importing next/document outside of pages/_document.jsx in Next.js projects.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noDoubleEqualsRequire the use of === and !==.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noDuplicateCaseDisallow duplicate case labels.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noDuplicateClassMembersDisallow duplicate class members.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noDuplicateElseIfDisallow duplicate conditions in if-else-if chains<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noDuplicateJsxPropsPrevents JSX properties to be assigned multiple times.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noDuplicateObjectKeysDisallow two keys with the same name inside objects.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noDuplicateParametersDisallow duplicate function parameter name.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noDuplicateTestHooksA describe block should not contain duplicate hooks.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noEmptyBlockStatementsDisallow empty block statements and static blocks.
noEmptyInterfaceDisallow the declaration of empty interfaces.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noEmptySourceDisallow empty sources.
noEvolvingTypesDisallow variables from evolving into any type through reassignments.
noExplicitAnyDisallow the any type usage.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noExportsInTestDisallow using export or module.exports in files containing tests<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noExtraNonNullAssertionPrevents the wrong usage of the non-null assertion operator (!) in TypeScript files.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noFallthroughSwitchClauseDisallow fallthrough of switch clauses.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noFocusedTestsDisallow focused tests.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noFunctionAssignDisallow reassigning function declarations.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noGlobalAssignDisallow assignments to native objects and read-only global variables.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noGlobalIsFiniteUse Number.isFinite instead of global isFinite.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noGlobalIsNanUse Number.isNaN instead of global isNaN.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noHeadImportInDocumentPrevent using the next/head module in pages/_document.js on Next.js projects.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noImplicitAnyLetDisallow use of implicit any type on variable declarations.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noImportAssignDisallow assigning to imported bindings<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noImportCyclesPrevent import cycles.
noIrregularWhitespaceDisallows the use of irregular whitespace characters.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noLabelVarDisallow labels that share a name with a variable<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noMisleadingCharacterClassDisallow characters made with multiple code points in character class syntax.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noMisleadingInstantiatorEnforce proper usage of new and constructor.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noMisplacedAssertionChecks that the assertion function, for example expect, is placed inside an it() function call.
noMisrefactoredShorthandAssignDisallow shorthand assign when variable appears on both sides.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noNonNullAssertedOptionalChainDisallow non-null assertions after optional chaining expressions.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noOctalEscapeDisallow octal escape sequences in string literals<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noPrototypeBuiltinsDisallow direct use of Object.prototype builtins.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noReactForwardRefReplaces usages of forwardRef with passing ref as a prop.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noReactSpecificPropsPrevents React-specific JSX properties from being used.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noRedeclareDisallow variable, function, class, and type redeclarations in the same scope.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noRedundantUseStrictPrevents from having redundant "use strict".<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noSelfCompareDisallow comparisons where both sides are exactly the same.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noShadowRestrictedNamesDisallow identifiers from shadowing restricted names.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noSkippedTestsDisallow disabled tests.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noSparseArrayPrevents the use of sparse arrays (arrays with holes).<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noSuspiciousSemicolonInJsxIt detects possible "wrong" semicolons inside JSX elements.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noTemplateCurlyInStringDisallow template literal placeholder syntax in regular strings.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noThenPropertyDisallow then property.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noTsIgnorePrevents the use of the TypeScript directive @ts-ignore.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noUnassignedVariablesDisallow let or var variables that are read but never assigned.
noUnsafeDeclarationMergingDisallow unsafe declaration merging between interfaces and classes.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noUnsafeNegationDisallow using unsafe negation.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noUnusedExpressionsDisallow expression statements that are neither a function call nor an
noUselessEscapeInStringDisallow unnecessary escapes in string literals.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
noUselessRegexBackrefsDisallow useless backreferences in regular expression literals that always match an empty string.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
noVarDisallow the use of var<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
noWithDisallow with statements in non-strict contexts.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useAdjacentOverloadSignaturesDisallow the use of overload signatures that are not next to each other.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useAwaitEnsure async functions utilize await.
useDefaultSwitchClauseLastEnforce default clauses in switch statements to be last<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useErrorMessageEnforce passing a message value when creating a built-in error.
useGetterReturnEnforce get methods to always return a value.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useGoogleFontDisplayEnforces the use of a recommended display strategy with Google Fonts.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useGuardForInRequire for-in loops to include an if statement.
useIsArrayUse Array.isArray() instead of instanceof Array.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useIterableCallbackReturnEnforce consistent return values in iterable callbacks.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span>
useNamespaceKeywordRequire using the namespace keyword over the module keyword to declare TypeScript namespaces.<span class='inline-icon' title="This rule is recommended" ><Icon name="approve-check-circle" size="1.2rem" label="This rule is recommended" /></span><span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useNumberToFixedDigitsArgumentEnforce using the digits argument with Number#toFixed().<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>
useStaticResponseMethodsUse static Response methods instead of new Response() constructor when possible.<span class='inline-icon' title="The rule has an unsafe fix" ><Icon name="warning" label="The rule has an unsafe fix" size="1.2rem" /></span>
useStrictModeEnforce the use of the directive "use strict" in script files.<span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span>

Missing a rule? Help us by contributing to the analyzer or create a rule suggestion here.