Qwik

Qwik-specific linting rules for Ultracite.

The Qwik configuration has Qwik-specific linting rules for serialization, visible tasks, lexical scope, and method usage.

Installation

Add the Qwik configuration to your biome.jsonc:

biome.jsonc
{
  "extends": ["ultracite/core", "ultracite/qwik"]
}

Overview

This configuration adds rules specific to Qwik development:

  • Serialization: Enforce proper use of Qwik's resumability model
  • Visible Tasks: Prevent inappropriate use of useVisibleTask$
  • Lexical Scope: Ensure proper variable scope in $ functions
  • Method Usage: Enforce correct Qwik method patterns
  • React-Specific Props: Disallow React-specific props in Qwik components

Qwik-Specific Rules

Nursery

RuleSettingDescription
noQwikUseVisibleTaskerrorPrevent usage of useVisibleTask$. This hook runs code eagerly on the client, defeating Qwik's resumability. Use useTask$ or useResource$ instead when possible.
useQwikClasslisterrorEnforce using class object syntax instead of string concatenation for dynamic classes in Qwik.
useQwikValidLexicalScopeerrorEnforce valid lexical scope in Qwik's $ functions. Variables from outer scopes must be explicitly captured.
useQwikMethodUsageerrorEnforce correct usage of Qwik-specific methods and APIs.

Suspicious

RuleSettingDescription
noReactSpecificPropserrorDisallow React-specific props like className and htmlFor in Qwik. Use class and for instead.

How is this guide?