Skip to main content
BEEQ enforces consistent code style with a combination of automated tools. The golden rule: follow the style you already see in the repository. Consistency with the rest of the project always takes precedence.

Tools

ToolPurpose
BiomeLinting and formatting for TypeScript / TSX / JS / JSX
StylelintLinting for SCSS stylesheets
EditorConfigEditor-agnostic baseline (indentation, line endings)
Prettier was previously used for formatting but has been replaced by Biome. If you see references to Prettier in older parts of the codebase, prefer Biome’s formatter instead.

Biome

Biome handles formatting and linting for all .ts, .tsx, .js, and .jsx files. The full configuration is in biome.json at the repository root.

Formatting rules

{
  "formatter": {
    "indentStyle": "space",
    "indentWidth": 2,
    "lineWidth": 120,
    "lineEnding": "lf",
    "bracketSpacing": true,
    "bracketSameLine": false
  },
  "javascript": {
    "formatter": {
      "quoteStyle": "single",
      "jsxQuoteStyle": "double",
      "trailingCommas": "all",
      "semicolons": "always",
      "arrowParentheses": "always"
    }
  }
}

Linting rules

Biome runs with the recommended ruleset plus several project-specific overrides:
RuleSeverityDescription
noUnusedImportserrorRemove any import that is not referenced
noUnusedVariableserrorRemove any variable that is not used
noUselessConstructorerrorRemove constructors that do nothing
useImportTypeerrorUse import type for type-only imports
useNodejsImportProtocolerrorUse node: prefix for Node.js built-ins
noExcessiveCognitiveComplexitywarnKeep functions readable
noUnusedPrivateClassMemberswarnRemove unused private members
noExplicitAnywarnAvoid any type annotations

Import order

Biome’s organizeImports assist action enforces this import group order:
  1. Node.js built-ins (e.g., node:path)
  2. (blank line)
  3. Third-party packages
  4. (blank line)
  5. Aliased internal modules
  6. Parent-directory relative imports (../)
  7. Same-directory relative imports (./)
  8. (blank line)
  9. Index re-exports (./index)

Naming conventions

Biome enforces naming conventions across the codebase:
Symbol kindAllowed formats
ClassesPascalCase
Private class propertiescamelCase, CONSTANT_CASE
const declarationscamelCase, PascalCase, CONSTANT_CASE
Function parameterscamelCase, CONSTANT_CASE
InterfacesPascalCase
Type aliasesPascalCase
Type parametersPascalCase, CONSTANT_CASE

Stylelint

Stylelint is used for all SCSS files inside the component scss/ directories. Run it via NX:
nx run-many --target=lint --all
Follow the existing SCSS patterns in the component files. Keep selectors scoped to the component and use CSS custom properties for any value that should be themeable.

EditorConfig

The .editorconfig file at the root sets baseline formatting rules that most editors respect automatically:
  • 2-space indentation
  • LF line endings
  • UTF-8 charset
  • Trim trailing whitespace
  • Insert final newline
If your editor supports EditorConfig (VS Code, JetBrains IDEs, Vim, etc.), these settings are applied automatically.

Running code style checks

# Lint all projects
nx run-many --target=lint --all

# Lint affected projects only
nx affected --target=lint
Install the Biome VS Code extension and the Stylelint extension to see errors inline as you type.

Build docs developers (and LLMs) love