# useQwikMethodUsage

Rule `biome/useQwikMethodUsage`. Disallow `use*` hooks outside of `component$` or other `use*` hooks in Qwik applications.

- Source: biome
- Technologies: Qwik, React
- Kind: correctness
- Needs type information: no
- Autofix: no
- Reach: 30.6M weekly downloads of presets that enable it
- Trend: +109.3% last quarter
- Rank: #601 by reach, #236 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `correctness/useQwikMethodUsage` | yes | no | group correctness, since 2.2.6 | [docs](https://biomejs.dev/linter/rules/use-qwik-method-usage/) |

## Code examples

### Incorrect: the rule reports this

```js
import { useSignal } from "@builder.io/qwik";

export const Counter = () => {
  const count = useSignal(0);
};
```

### Correct: the rule accepts this

```js
import { component$, useSignal } from "@builder.io/qwik";

export const Counter = component$(() => {
  const count = useSignal(0);
});

export const useCounter = () => {
  const count = useSignal(0);
  return count;
};
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "correctness": {
        "useQwikMethodUsage": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |

## Related rules

- [biome/useQwikLoaderLocation](https://lintradar.dev/rules/biome/useQwikLoaderLocation.md): Enforce that Qwik loader functions are declared in the correct location.
- [biome/useQwikValidLexicalScope](https://lintradar.dev/rules/biome/useQwikValidLexicalScope.md): Disallow unserializable expressions in Qwik dollar ($) scopes.
- [biome/useQwikClasslist](https://lintradar.dev/rules/biome/useQwikClasslist.md): Prefer using the `class` prop as a classlist over the `classnames` helper.
- [biome/useReactAsyncServerFunction](https://lintradar.dev/rules/biome/useReactAsyncServerFunction.md): Require functions with the "use server" directive to be async.
- [biome/usePlaywrightValidDescribeCallback](https://lintradar.dev/rules/biome/usePlaywrightValidDescribeCallback.md): Enforce valid `describe()` callback.
- [biome/useReactNativePlatformComponents](https://lintradar.dev/rules/biome/useReactNativePlatformComponents.md): Ensure that platform-specific React Native components are only imported in files named for that platform.

---

Web page: https://lintradar.dev/rules/biome/useQwikMethodUsage. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
