New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@ilo-org/typescript-config

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ilo-org/typescript-config

Typescript configuration for ILO Design System

latest
Source
npmnpm
Version
2.0.1
Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created
Source

@ilo-org/typescript-config

TypeScript configuration for ILO Design System projects

This package provides sensible TypeScript compiler defaults that enforce strict type checking and modern JavaScript/TypeScript features. It's designed to work seamlessly with @ilo-org/eslint-config for a complete type-safe development experience.

Requirements

  • TypeScript 4.x or higher
  • Node.js with ES modules support

Installation

npm install -D @ilo-org/typescript-config
# or
pnpm add -D @ilo-org/typescript-config
# or
yarn add -D @ilo-org/typescript-config

Usage

Basic Usage

Create a tsconfig.json file in your project root and extend this configuration:

{
  "extends": "@ilo-org/typescript-config",
  "compilerOptions": {
    "outDir": "dist"
  }
}

Alternatively, you can reference the full path:

{
  "extends": "@ilo-org/typescript-config/tsconfig.json",
  "compilerOptions": {
    "outDir": "dist"
  }
}

Extending Configuration

You can override or add compiler options as needed:

{
  "extends": "@ilo-org/typescript-config",
  "compilerOptions": {
    "outDir": "lib",
    "declaration": true,
    "declarationDir": "lib/types"
  },
  "include": ["src/**/*"],
  "exclude": ["node_modules", "dist"]
}

Configuration Options

This configuration includes the following TypeScript compiler options:

Module System

OptionValueDescription
moduleesnextUse the latest ES module format
moduleResolutionnodeUse Node.js-style module resolution
esModuleInteroptrueEnable interoperability between CommonJS and ES modules
allowSyntheticDefaultImportstrueAllow default imports from modules with no default export
isolatedModulestrueEnsure each file can be safely transpiled without other files
resolveJsonModuletrueAllow importing JSON files as modules

Language Features

OptionValueDescription
targetes6Compile to ES6 (ES2015)
lib["es2017"]Include ES2017 library type definitions
jsxreact-jsxUse the new JSX transform (React 17+)
allowJstrueAllow JavaScript files to be included

Type Checking

OptionValueDescription
stricttrueEnable all strict type checking options
alwaysStricttrueParse in strict mode and emit "use strict"
noImplicitAnytrueRaise error on expressions and declarations with an implied any type
strictBindCallApplytrueEnable stricter checking of bind, call, and apply methods
strictFunctionTypesfalseDisable stricter checking of function types (allows bivariance)
noUnusedLocalstrueReport errors on unused local variables
noUnusedParameterstrueReport errors on unused parameters
noFallthroughCasesInSwitchtrueReport errors for fallthrough cases in switch statements
forceConsistentCasingInFileNamestrueDisallow inconsistently-cased references to the same file

Emit Options

OptionValueDescription
sourceMaptrueGenerate corresponding .map files for debugging
skipLibChecktrueSkip type checking of declaration files (faster compilation)

Excluded Files

The following directories are excluded by default:

  • **/lib/* - Compiled output
  • **/node_modules/* - Dependencies
  • **/dist/* - Distribution files

Common Use Cases

Library Package

For a library that needs to emit declaration files:

{
  "extends": "@ilo-org/typescript-config",
  "compilerOptions": {
    "outDir": "lib",
    "declaration": true,
    "declarationDir": "lib/types"
  },
  "include": ["src/**/*"],
  "exclude": ["node_modules", "lib", "**/*.test.ts"]
}

React Application

For a React application with DOM types:

{
  "extends": "@ilo-org/typescript-config",
  "compilerOptions": {
    "jsx": "react-jsx",
    "lib": ["dom", "dom.iterable", "es2017"],
    "types": ["node"]
  },
  "include": ["./src", "./tests"],
  "exclude": ["node_modules", "dist"]
}

Build Configuration

For a separate build configuration (e.g., tsconfig.build.json):

{
  "extends": "@ilo-org/typescript-config",
  "compilerOptions": {
    "outDir": "lib",
    "declaration": true
  },
  "include": ["src/**/*"],
  "exclude": ["**/lib/*", "**/node_modules/*", "**/*.test.ts"]
}

Then reference it in your main tsconfig.json:

{
  "extends": "./tsconfig.build.json",
  "compilerOptions": {
    "noEmit": true
  },
  "include": ["src/**/*", "tests/**/*"]
}

Monorepo Root

For a monorepo root configuration:

{
  "extends": "./config/typescript-config/tsconfig.json",
  "compilerOptions": {
    "baseUrl": ".",
    "noEmit": true
  },
  "include": ["**/src/*"],
  "exclude": ["**/lib/*", "**/node_modules/*", "**/dist/*"]
}

Integration with ESLint

This TypeScript configuration is designed to work seamlessly with @ilo-org/eslint-config, which uses TypeScript ESLint for type-aware linting. The ESLint config automatically resolves your tsconfig.json for type checking.

Why These Settings?

  • Strict mode enabled - Catches more potential bugs at compile time
  • ES2017 library - Provides modern JavaScript APIs while maintaining compatibility
  • ES6 target - Good balance between modern features and browser support
  • React JSX transform - Uses the modern JSX transform (no need to import React)
  • Isolated modules - Ensures files can be safely transpiled independently (important for build tools)
  • Source maps - Enables better debugging experience
  • Skip lib check - Faster compilation by skipping type checking of declaration files

📝 License

Licensed under the Apache 2.0 License.

Keywords

ilo-design-system

FAQs

Package last updated on 15 Jul 2026

Related posts