You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/linter/javascript/rules.mdx
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -162,43 +162,43 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of
162
162
|[noMagicNumbers](/linter/rules/no-magic-numbers)| Reports usage of "magic numbers" — numbers used directly instead of being assigned to named constants. ||
163
163
|[noMisusedPromises](/linter/rules/no-misused-promises)| Disallow Promises to be used in places where they are almost certainly a | <spanclass='inline-icon'title="The rule has an unsafe fix" ><Iconname="warning"label="The rule has an unsafe fix"size="1.2rem" /></span> |
164
164
|[noNestedComponentDefinitions](/linter/rules/no-nested-component-definitions)| Disallows defining React components inside other components. ||
165
-
|[noNonNullAssertedOptionalChain](/linter/rules/no-non-null-asserted-optional-chain)| Disallow non-null assertions after optional chaining expressions. |<spanclass='inline-icon'title="This rule is not released yet"><Iconname="moon"label="This rule is not released yet"size="1.2rem" /></span>|
165
+
|[noNonNullAssertedOptionalChain](/linter/rules/no-non-null-asserted-optional-chain)| Disallow non-null assertions after optional chaining expressions. ||
166
166
|[noNoninteractiveElementInteractions](/linter/rules/no-noninteractive-element-interactions)| Disallow use event handlers on non-interactive elements. ||
167
167
|[noProcessGlobal](/linter/rules/no-process-global)| Disallow the use of `process` global. | <spanclass='inline-icon'title='The rule has a safe fix.'><Iconname="seti:config"label="The rule has a safe fix"size="1.2rem" /></span> |
168
-
|[noQwikUseVisibleTask](/linter/rules/no-qwik-use-visible-task)| Disallow `useVisibleTask$()` functions in Qwik components. |<spanclass='inline-icon'title="This rule is not released yet"><Iconname="moon"label="This rule is not released yet"size="1.2rem" /></span>|
168
+
|[noQwikUseVisibleTask](/linter/rules/no-qwik-use-visible-task)| Disallow `useVisibleTask$()` functions in Qwik components. ||
169
169
|[noReactPropAssign](/linter/rules/no-react-prop-assign)| Disallow assigning to React component props. ||
170
170
|[noRestrictedElements](/linter/rules/no-restricted-elements)| Disallow the use of configured elements. ||
171
171
|[noSecrets](/linter/rules/no-secrets)| Disallow usage of sensitive data such as API keys and tokens. ||
172
172
|[noShadow](/linter/rules/no-shadow)| Disallow variable declarations from shadowing variables declared in the outer scope. ||
173
173
|[noTsIgnore](/linter/rules/no-ts-ignore)| Prevents the use of the TypeScript directive `@ts-ignore`. | <spanclass='inline-icon'title='The rule has a safe fix.'><Iconname="seti:config"label="The rule has a safe fix"size="1.2rem" /></span> |
174
174
|[noUnassignedVariables](/linter/rules/no-unassigned-variables)| Disallow `let` or `var` variables that are read but never assigned. ||
175
-
|[noUnnecessaryConditions](/linter/rules/no-unnecessary-conditions)| Disallow unnecessary type-based conditions that can be statically determined as redundant. |<spanclass='inline-icon'title="This rule is not released yet"><Iconname="moon"label="This rule is not released yet"size="1.2rem" /></span>|
175
+
|[noUnnecessaryConditions](/linter/rules/no-unnecessary-conditions)| Disallow unnecessary type-based conditions that can be statically determined as redundant. ||
176
176
|[noUnresolvedImports](/linter/rules/no-unresolved-imports)| Warn when importing non-existing exports. ||
177
177
|[noUnwantedPolyfillio](/linter/rules/no-unwanted-polyfillio)| Prevent duplicate polyfills from Polyfill.io. ||
178
178
|[noUselessBackrefInRegex](/linter/rules/no-useless-backref-in-regex)| Disallow useless backreferences in regular expression literals that always match an empty string. ||
179
179
|[noUselessEscapeInString](/linter/rules/no-useless-escape-in-string)| Disallow unnecessary escapes in string literals. | <spanclass='inline-icon'title='The rule has a safe fix.'><Iconname="seti:config"label="The rule has a safe fix"size="1.2rem" /></span> |
180
180
|[noUselessUndefined](/linter/rules/no-useless-undefined)| Disallow the use of useless `undefined`. | <spanclass='inline-icon'title='The rule has a safe fix.'><Iconname="seti:config"label="The rule has a safe fix"size="1.2rem" /></span> |
181
-
|[noVueDataObjectDeclaration](/linter/rules/no-vue-data-object-declaration)| Enforce that Vue component `data` options are declared as functions. | <spanclass='inline-icon'title='The rule has a safe fix.'><Iconname="seti:config"label="The rule has a safe fix"size="1.2rem" /></span><spanclass='inline-icon'title="This rule is not released yet"><Iconname="moon"label="This rule is not released yet"size="1.2rem" /></span>|
181
+
|[noVueDataObjectDeclaration](/linter/rules/no-vue-data-object-declaration)| Enforce that Vue component `data` options are declared as functions. | <spanclass='inline-icon'title='The rule has a safe fix.'><Iconname="seti:config"label="The rule has a safe fix"size="1.2rem" /></span> |
182
182
|[noVueReservedKeys](/linter/rules/no-vue-reserved-keys)| Disallow reserved keys in Vue component data and computed properties. ||
183
183
|[noVueReservedProps](/linter/rules/no-vue-reserved-props)| Disallow reserved names to be used as props. ||
184
184
|[useAdjacentGetterSetter](/linter/rules/use-adjacent-getter-setter)| Enforce that getters and setters for the same property are adjacent in class and object definitions. ||
185
-
|[useAnchorHref](/linter/rules/use-anchor-href)| Enforces `href` attribute for `<a>` elements. |<spanclass='inline-icon'title="This rule is not released yet"><Iconname="moon"label="This rule is not released yet"size="1.2rem" /></span>|
185
+
|[useAnchorHref](/linter/rules/use-anchor-href)| Enforces `href` attribute for `<a>` elements. ||
186
186
|[useConsistentObjectDefinition](/linter/rules/use-consistent-object-definition)| Require the consistent declaration of object literals. Defaults to explicit definitions. | <spanclass='inline-icon'title='The rule has a safe fix.'><Iconname="seti:config"label="The rule has a safe fix"size="1.2rem" /></span> |
187
187
|[useConsistentResponse](/linter/rules/use-consistent-response)| Use static `Response` methods instead of `new Response()` constructor when possible. | <spanclass='inline-icon'title="The rule has an unsafe fix" ><Iconname="warning"label="The rule has an unsafe fix"size="1.2rem" /></span> |
188
-
|[useConsistentTypeDefinitions](/linter/rules/use-consistent-type-definitions)| Enforce type definitions to consistently use either `interface` or `type`. | <spanclass='inline-icon'title="The rule has an unsafe fix" ><Iconname="warning"label="The rule has an unsafe fix"size="1.2rem" /></span><spanclass='inline-icon'title="This rule is not released yet"><Iconname="moon"label="This rule is not released yet"size="1.2rem" /></span>|
188
+
|[useConsistentTypeDefinitions](/linter/rules/use-consistent-type-definitions)| Enforce type definitions to consistently use either `interface` or `type`. | <spanclass='inline-icon'title="The rule has an unsafe fix" ><Iconname="warning"label="The rule has an unsafe fix"size="1.2rem" /></span> |
189
189
|[useExhaustiveSwitchCases](/linter/rules/use-exhaustive-switch-cases)| Require switch-case statements to be exhaustive. | <spanclass='inline-icon'title="The rule has an unsafe fix" ><Iconname="warning"label="The rule has an unsafe fix"size="1.2rem" /></span> |
190
190
|[useExplicitType](/linter/rules/use-explicit-type)| Enforce types in functions, methods, variables, and parameters. ||
191
191
|[useExportsLast](/linter/rules/use-exports-last)| Require that all exports are declared after all non-export statements. ||
192
192
|[useForComponent](/linter/rules/use-for-component)| Enforce using Solid's `<For />` component for mapping an array to JSX elements. ||
193
193
|[useGoogleFontPreconnect](/linter/rules/use-google-font-preconnect)| Ensure the `preconnect` attribute is used when using Google Fonts. | <spanclass='inline-icon'title='The rule has a safe fix.'><Iconname="seti:config"label="The rule has a safe fix"size="1.2rem" /></span> |
194
-
|[useImageSize](/linter/rules/use-image-size)| Enforces that `<img>` elements have both width and height attributes. |<spanclass='inline-icon'title="This rule is not released yet"><Iconname="moon"label="This rule is not released yet"size="1.2rem" /></span>|
194
+
|[useImageSize](/linter/rules/use-image-size)| Enforces that `<img>` elements have both width and height attributes. ||
195
195
|[useIndexOf](/linter/rules/use-index-of)| Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item. | <spanclass='inline-icon'title="The rule has an unsafe fix" ><Iconname="warning"label="The rule has an unsafe fix"size="1.2rem" /></span> |
196
196
|[useIterableCallbackReturn](/linter/rules/use-iterable-callback-return)| Enforce consistent return values in iterable callbacks. ||
197
197
|[useJsonImportAttribute](/linter/rules/use-json-import-attribute)| Enforces the use of `with { type: "json" }` for JSON module imports. | <spanclass='inline-icon'title='The rule has a safe fix.'><Iconname="seti:config"label="The rule has a safe fix"size="1.2rem" /></span> |
198
198
|[useNumericSeparators](/linter/rules/use-numeric-separators)| Enforce the use of numeric separators in numeric literals. | <spanclass='inline-icon'title='The rule has a safe fix.'><Iconname="seti:config"label="The rule has a safe fix"size="1.2rem" /></span> |
199
199
|[useObjectSpread](/linter/rules/use-object-spread)| Prefer object spread over `Object.assign()` when constructing new objects. | <spanclass='inline-icon'title='The rule has a safe fix.'><Iconname="seti:config"label="The rule has a safe fix"size="1.2rem" /></span> |
200
200
|[useParseIntRadix](/linter/rules/use-parse-int-radix)| Enforce the consistent use of the radix argument when using `parseInt()`. | <spanclass='inline-icon'title="The rule has an unsafe fix" ><Iconname="warning"label="The rule has an unsafe fix"size="1.2rem" /></span> |
201
-
|[useQwikClasslist](/linter/rules/use-qwik-classlist)| Prefer using the `class` prop as a classlist over the `classnames` helper. |<spanclass='inline-icon'title="This rule is not released yet"><Iconname="moon"label="This rule is not released yet"size="1.2rem" /></span>|
201
+
|[useQwikClasslist](/linter/rules/use-qwik-classlist)| Prefer using the `class` prop as a classlist over the `classnames` helper. ||
202
202
|[useReactFunctionComponents](/linter/rules/use-react-function-components)| Enforce that components are defined as functions and never as classes. ||
203
203
|[useReadonlyClassProperties](/linter/rules/use-readonly-class-properties)| Enforce marking members as `readonly` if they are never modified outside the constructor. | <spanclass='inline-icon'title="The rule has an unsafe fix" ><Iconname="warning"label="The rule has an unsafe fix"size="1.2rem" /></span> |
204
204
|[useSingleJsDocAsterisk](/linter/rules/use-single-js-doc-asterisk)| Enforce JSDoc comment lines to start with a single asterisk, except for the first one. | <spanclass='inline-icon'title="The rule has an unsafe fix" ><Iconname="warning"label="The rule has an unsafe fix"size="1.2rem" /></span> |
0 commit comments