Skip to content

kontent-ai/biome-config

Repository files navigation

Contributors npm Forks Stargazers Issues MIT License

Discord

Kontent.ai Biome configuration

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.

Getting Started

  1. 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
  2. Extend your Biome configuration by creating a biome.json file in your project root:

    // biome.json
    {
        "$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
        "extends": ["@kontent-ai/biome-config/base"]
    }

    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"
        ]
    }
  3. 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)

License

Distributed under the MIT License. See LICENSE.md for more information.

About

Biome configuration shared for Kontent.ai repositories

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •