Skip to main content

@livon/config

npm dependencies npm publish OpenSSF Best Practices Snyk security package size license

Purpose

Shared monorepo configuration package for:

  • TypeScript
  • ESLint
  • SWC
  • Rsbuild / Rslib / Rspack
  • Vitest

Best for

Use this package when workspace projects need consistent tooling defaults across lint, build, and test.

Install

pnpm add -D @livon/config

Add the tool packages for the exports you actually use. For example:

  • ESLint: eslint, @typescript-eslint/parser, @typescript-eslint/eslint-plugin
  • Rslib: @rslib/core
  • Rsbuild: @rsbuild/core, @rsbuild/plugin-react
  • Rspack: @rspack/core, @rspack/plugin-react-refresh

Usage

TypeScript

{
"extends": "@livon/config/tsconfig/library.json"
}

ESLint

module.exports = require('@livon/config/eslint/base.cjs');

Rslib

import {createRslibConfig} from '@livon/config/rslib/base';

export default createRslibConfig({
target: 'web',
formats: ['esm', 'cjs'],
});

Vitest

import {createVitestConfig} from '@livon/config/vitest/base';

export default createVitestConfig({type: 'unit'});

Parameters in these examples

TypeScript:

  • extends (string): path to shared tsconfig preset from @livon/config.

ESLint:

  • require(...) path (string): shared eslint preset module path.

Rslib / Vitest:

  • createRslibConfig({...}):
    • target ('web' | 'node'): output runtime target.
    • formats (('esm' | 'cjs')[]): module formats to emit.
  • createVitestConfig({...}):
    • type ('unit' | 'integration'): test project mode.