Skip to content

Lint

golar lint runs lint rules and skips type-checking.

Terminal window
npx golar lint

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

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 lint
  • rules: 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.

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.