@chatie/tsconfig
tsconfig.json inheritance via Node.js packages
Last updated 3 months ago by chatie .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @chatie/tsconfig 
SYNC missed versions from official npm registry.

tsconfig

NPM Version npm (tag) Build Status

tsconfig.json

Picture: What is tsconfig.json

Reusable TypeScript configuration files to extend from.

This module enables other module to inheritance tsconfig.json via Node.js packages

USAGE

Extends from @chatie/tsconfig from your tsconfig.json, to have the chatie version of the TypeScript Configuration.

It aim the following goals:

  1. Support the latest esnext ECMAScript
  2. Targeting for ES6
  3. Strict for everything
  4. Aiming for Convenience, including the esModuleInterop and resolveJsonModule etc.

CAUTION

Do not put any directory related configurations into this module. Only put directory related configurations to the consumer of this module.

Because all directory in tsconfig.json is related to the curfrent directory.

SEE ALSO

TypeScript 3.2 now resolves tsconfig.jsons from node_modules. When using a bare path for the "extends" field in tsconfig.json, TypeScript will dive into node_modules packages for us.

{
    "extends": "@my-team/tsconfig-base",
    "include": ["./**/*"]
    "compilerOptions": {
        // Override certain options on a project-by-project basis.
        "strictBindCallApply": false,
    }
}

Here, TypeScript will climb up node_modules folders looking for a @my-team/tsconfig-base package. For each of those packages, TypeScript will first check whether package.json contains a "tsconfig" field, and if it does, TypeScript will try to load a configuration file from that field. If neither exists, TypeScript will try to read from a tsconfig.json at the root. This is similar to the lookup process for .js files in packages that Node uses, and the .d.ts lookup process that TypeScript already uses.

This feature can be extremely useful for bigger organizations, or projects with lots of distributed dependencies.

DEPENDENCES

This module will run a unit test before it could be able to publish to NPM.

The unit test load tsconfig schema from JSON Schema Store and then use is-my-json-valid to validate it.

HISTORY

(master)

v0.10 Apr 2020

  1. Add dom to lib in tsconfig.json

v0.6 June 08 2019

  1. Auto generate tsconfig.json in project root directory after install if it not exists.

v0.4 May 14 2019

  1. Only publish tsconfig.json to NPM to prevent strange bugs
  2. Create a tsconfig base setting module for sharing across projects

AUTHOR

Huan LI (李卓桓) zixia@zixia.net

Profile of Huan LI (李卓桓) on StackOverflow

COPYRIGHT & LICENSE

  • Code & Docs © 2019 - now Huan LI zixia@zixia.net
  • Code released under the Apache-2.0 License
  • Docs released under Creative Commons

Current Tags

  • 0.10.1                                ...           latest (3 months ago)
  • 0.11.4                                ...           next (19 days ago)

29 Versions

  • 0.11.4                                ...           19 days ago
  • 0.11.3                                ...           2 months ago
  • 0.11.1                                ...           2 months ago
  • 0.10.1                                ...           3 months ago
  • 0.10.0                                ...           3 months ago
  • 0.8.0                                ...           6 months ago
  • 0.7.5                                ...           6 months ago
  • 0.7.4                                ...           a year ago
  • 0.7.3                                ...           a year ago
  • 0.7.2                                ...           a year ago
  • 0.7.1                                ...           a year ago
  • 0.6.1                                ...           a year ago
  • 0.5.10                                ...           a year ago
  • 0.5.9                                ...           a year ago
  • 0.5.5                                ...           a year ago
  • 0.4.5                                ...           a year ago
  • 0.4.4                                ...           a year ago
  • 0.4.3                                ...           a year ago
  • 0.4.2                                ...           a year ago
  • 0.4.1 [deprecated]           ...           a year ago
  • 0.4.0 [deprecated]           ...           a year ago
  • 0.3.2                                ...           a year ago
  • 0.3.1                                ...           a year ago
  • 0.2.4                                ...           a year ago
  • 0.2.3                                ...           a year ago
  • 0.2.2                                ...           a year ago
  • 0.2.1                                ...           a year ago
  • 0.1.6                                ...           a year ago
  • 0.0.3                                ...           a year ago
Maintainers (2)
Downloads
Today 5
This Week 5
This Month 89
Last Day 1
Last Week 79
Last Month 220
Dependencies (4)
Dev Dependencies (10)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |