Skip to content

cosn/tsc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

df2ac63 · Apr 13, 2025
Apr 12, 2025
Apr 12, 2025
Jun 16, 2024
Sep 3, 2024
Feb 24, 2024
Jul 6, 2024
Apr 12, 2025
Mar 28, 2025
Jul 13, 2024
Sep 22, 2024
Sep 22, 2024
Sep 21, 2024
Jan 26, 2025
Jun 16, 2024
Mar 28, 2025
Jun 16, 2024
Apr 12, 2025
Apr 12, 2025
Feb 3, 2025
Nov 9, 2024
Aug 10, 2024
Jul 18, 2024

Repository files navigation

@cosn/tsc

Sensible defaults I use for my projects.

Installation

pnpm add --save-dev @cosn/tsc

Usage

TypeScript

Create a tsconfig.json file in your project root with the following content:

Server

{
  "extends": ["@cosn/tsc/tsconfig-srv"]
}

Web

{
  "extends": ["@cosn/tsc/tsconfig-web"]
}

Library

{
  "extends": ["@cosn/tsc/tsconfig-lib"]
}

Prettier

Default

Use this config is in your package.json:

"prettier": "@cosn/tsc/prettier",

Customizing

Create a .prettierrc.js file in your project root with the following content:

import defaultConfig from '@cosn/tsc/prettier'

/** @type {import("prettier").Options} */
export default {
  ...defaultConfig,
  // overrides
}

ESLint

Create a eslint.config.js file in your project root with the following content:

import { config as defaultConfig } from '@cosn/tsc/eslint'

/** @type {import("eslint").Linter.Config} */
export default [...defaultConfig]