@freestylejs/config
v1.5.0
Published
Core configurations for freestyle codebase.
Readme
@freestylejs/config
This package provides shareable configurations for Biome and TypeScript for Freestyle.js projects.
Installation
pnpm add -D @freestylejs/configPkg Usage
Biome
To use the shareable Biome configuration, create a biome.json file in the root of your project and extend the configuration from this package:
{
"extends": ["@freestylejs/config/biome"]
}TypeScript
To use the shareable TypeScript configuration, create a tsconfig.json file in the root of your project and extend the configuration from this package:
{
"extends": "@freestylejs/config/tsconfig",
"include": ["src"]
}For TypeScript 7 (no baseUrl, relative paths), use:
{
"extends": "@freestylejs/config/tsconfig-ts7",
"include": ["src"],
"compilerOptions": {
"paths": {
"~/*": ["./src/*"]
}
}
}Oxc — Oxlint and Oxfmt
Shared Oxc defaults are exported as plain objects.
oxlint.config.ts:
import { defineConfig } from 'oxlint'
import { oxlintConfig } from '@freestylejs/config/oxlint'
export default defineConfig(oxlintConfig)oxfmt.config.ts:
import { defineConfig } from 'oxfmt'
import { oxfmtConfig } from '@freestylejs/config/oxfmt'
export default defineConfig(oxfmtConfig)Project-specific overrides belong in the consuming repository.
Toolchain
The shared version manifest is available for templates and sync checks:
import { toolchain, toolchainPackages } from '@freestylejs/config/toolchain'
console.log(toolchain.typescript)
console.log(toolchainPackages.oxlint)The package also exposes one resolver for consumer repositories:
freestyle-sync-toolchain --check
freestyle-sync-toolchain --writeIt updates managed dependency versions, packageManager, engines.node,
engines.pnpm, and .nvmrc from the manifest above.
Use --root <path> to resolve a repository other than the current directory.
Vite+ (legacy)
The ./vite and ./biome exports remain available for repositories that have
not migrated to the Oxc toolchain yet. They are not used by the current
.pkg reference or generated templates.
Template Usage
VSCode Settings
To use the recommended VSCode settings for Biome, create a vscode/settings.json file in the root of your project and add the following configuration:
Scripts Configuration
To use the recommended scripts for Biome, create a scripts/scripts.json file in the root of your project and add the following configuration:
Git Commit Convention
Git Ignore Configuration
NPM Package Configuration
CI Configuration
Versioning
Commit all files
Update pkg version using
- patch:
pnpm version patch - minor:
pnpm version minor - major:
pnpm version major
Publish via
pnpm releasePush commits and tags via
pnpm release:pushDone.
