Shared Biome and TypeScript configurations for JS/TS projects.
Install Biome and the configuration as development dependencies:
npm i -D @biomejs/biome@^2.5.15 @yboyer/configCreate a biome.json file at the project root with the following content to extend the shared configuration:
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["@yboyer/config/biome.json"]
}Extend tsconfig.json with the shared configuration file:
{
"extends": "@yboyer/config/tsconfig.json",
…
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist",
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["./src"]
}To check code conformance:
npx biome check .To apply automatic fixes (formatting and imports):
npx biome check --apply .- noUnnecessaryConditions
- types