@livon/config
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
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.