@kokojs/tsconfig

3.33.13 • Public • Published

统一 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
  }
}

维护者

章永胜、陈嘉涵。

Readme

Keywords

none

Package Sidebar

Install

npm i @kokojs/tsconfig

Weekly Downloads

4

Version

3.33.13

License

MIT

Unpacked Size

2.03 kB

Total Files

3

Last publish

Collaborators

  • zhangguangyi
  • landluck
  • youzan_npm_platform
  • chenjiahan