This is the Biome configuration that Kontent.ai uses for its TypeScript packages. Biome is a fast formatter, linter, and more for JavaScript, TypeScript, JSX, and JSON.
-
Install the package and Biome.
# Install Biome if you don't already have it npm i --save-dev @biomejs/biome # Install the shared configuration npm i --save-dev @kontent-ai/biome-config
-
Extend your Biome configuration by creating a
biome.json
file in your project root:For React projects, you can extend the React-specific configuration:
// biome.json { "$schema": "./node_modules/@biomejs/biome/configuration_schema.json", "extends": [ "@kontent-ai/biome-config/base", "@kontent-ai/biome-config/react" ] }
-
Run Biome commands based on your project needs:
# Format your code npx biome format --write . # Lint your code npx biome lint . # Check both formatting and linting npx biome check .
Available configurations are:
@kontent-ai/biome-config/base
(base configuration for any TypeScript/JavaScript file)@kontent-ai/biome-config/react
(React specific rules, should be used together with the base configuration)
Distributed under the MIT License. See LICENSE.md
for more information.