# Advanced composition

If the default by project type configurations doesn't fits your needs, rather than writing your own configuration from scratch, you can compose a new one from the underlying configuration pieces of @workleap/typescript-configs.

# Available pieces

Name Description
core Basic rules shared by every configuration.
react Rules for React applications and libraries.

# Compose a new configuration

Each configuration piece can be extended individually, or in combination with other pieces, to compose your own custom TypeScript configuration.

# React configuration

To extend the base configuration for a React project:

tsconfig.json
{
    "extends": "@workleap/typescript-configs/react",
    "compilerOptions": {
        ...
    },
    "exclude": ["dist", "node_modules"]
}

# Non React configuration

To extend the core configuration for a regular TypeScript project:

tsconfig.json
{
    "extends": "@workleap/typescript-configs/core",
    "compilerOptions": {
        ...
    },
    "exclude": ["dist", "node_modules"]
}