@padosoft/config
v1.3.1
Published
Shared TypeScript, Biome, and tsdown configurations for padosoft packages and apps
Readme
@padosoft/config
Shared TypeScript, Biome, and tsdown configurations for padosoft packages and apps.
Installation
npm install -D @padosoft/configContents
TypeScript configs
Extend any of these base configs in your tsconfig.json:
{ "extends": "@padosoft/config/typescript/base" }
{ "extends": "@padosoft/config/typescript/compiler" }
{ "extends": "@padosoft/config/typescript/expo" }
{ "extends": "@padosoft/config/typescript/hono" }Biome config
{ "extends": ["@padosoft/config/tools/biome"] }tsdown config factory
Use the tsdown helper to get a consistent bundler setup across packages:
// tsdown.config.ts
import { tsdown } from "@padosoft/config/compiler/tsdown";
export default tsdown({
entry: ["src/index.ts"],
});The factory sets dts: true, splitting: false, treeshake: true, minification outside watch mode, and outDir: "dist" by default.
Compiler plugins
hono-zod
A tsdown plugin that handles the hono/zod integration for type generation:
import { tsdown } from "@padosoft/config/compiler/tsdown";
import { honoZodPlugin } from "@padosoft/config/compiler/plugins/hono-zod";
export default tsdown({
plugins: [honoZodPlugin()],
});TypeScript type declarations
Import ambient declarations for CSS modules, NativeWind, Expo Router, and i18next:
// In your tsconfig.json types array or a .d.ts file:
import "@padosoft/config/types/css";
import "@padosoft/config/types/nativewind";
import "@padosoft/config/types/expo-router";
import "@padosoft/config/types/i18next";Export utilities
import { defaultCustomExports } from "@padosoft/config/compiler/utils/exports";
import { /* helpers */ } from "@padosoft/config/compiler/utils";