Socket
Book a DemoInstallSign in
Socket

@kokojs/tsconfig

Package Overview
Dependencies
Maintainers
4
Versions
442
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kokojs/tsconfig

`@kokojs/tsconfig` 提供了统一的 tsconfig 配置。

latest
npmnpm
Version
4.0.35
Version published
Maintainers
4
Created
Source

统一 tsconfig 配置

@kokojs/tsconfig 提供了统一的 tsconfig 配置。

安装

yarn add @kokojs/tsconfig --dev

Tips: 若项目中安装了 koko-preset-h5 或 koko-preset-pc,则无需手动安装上述依赖。

使用方式

创建 tsconfig.json 文件并添加如下配置:

{
  "extends": "@kokojs/tsconfig",
  "compilerOptions": {
    "outDir": "dist",
    "target": "es2018",
    "lib": ["es2018"]
  }
}

校验规则

@kokojs/tsconfig 中包含了以下规则集合:

{
  "compilerOptions": {
    "target": "es2017", // Node.js 8
    "module": "commonjs",
    "esModuleInterop": true,
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "jsx": "preserve",
    "strict": true,
    "noImplicitReturns": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noFallthroughCasesInSwitch": true,
    "noEmitOnError": true,
    "useDefineForClassFields": true,
    "forceConsistentCasingInFileNames": true,
    "skipLibCheck": true
  }
}

维护者

章永胜、陈嘉涵。

FAQs

Package last updated on 01 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts