Lint
golar lint runs lint rules and skips type-checking.
npx golar lintpnpm golar lintyarn golar lintWhat It Does
Section titled “What It Does”lint loads golar.config.ts, resolves files from lint.use, creates a workspace for those files, and runs every configured lint rule.
Golar supports three kinds of lint rules in this mode:
- builtin rules bundled with
golar - custom JavaScript rules
- native rules loaded from addons
Configuration
Section titled “Configuration”Lint mode reads only the lint section of golar.config.ts.
import { defineConfig } from 'golar/unstable'
export default defineConfig({ lint: { use: [ { files: ['src/**/*.ts'], rules: [], }, ], },})Each entry in lint.use declares:
files: the glob patterns to lintrules: the rules that should run for matching files
Those rules can come from Golar builtin rules, custom JavaScript rules, or native addons.
For end-to-end examples, see JavaScript rules and Rust rules.
When to Use It
Section titled “When to Use It”Use lint when you want lint errors only, or when linting and type-checking run as separate CI steps. Otherwise, the default mode is preferred.