Run golar type checking and type-aware linting alongside your Rsbuild build, in a separate process.
Because golar is built on typescript-go and understands embedded languages,
type errors inside .vue, .svelte, .astro and .gts files are reported at
their real position in the source file.
pnpm add -D @golar-rstack/rsbuild golarCreate golar.config.ts in your project root. golar discovers it relative to
its working directory:
import { defineConfig } from 'golar/unstable'
import '@golar/vue'
export default defineConfig({})// rsbuild.config.ts
import { pluginGolar } from '@golar-rstack/rsbuild'
import { defineConfig } from '@rsbuild/core'
import { pluginVue } from '@rsbuild/plugin-vue'
export default defineConfig({
plugins: [pluginVue(), pluginGolar()],
})In dev the check runs asynchronously so it never delays HMR; results land in
the terminal and the browser error overlay. In build the compilation waits for
golar, so type errors fail the build.
See the repository README for the full list. Two worth knowing up front:
lintSeveritydefaults to'warning', because golar exits 0 when only lint rules fire.cwddefaults to Rsbuild'srootPathand is what selects the golar config, since golar has no--configflag.
- Node.js >= 22.12
golarinstalled in the project
MIT