npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@chatie/tsconfig

v4.9.2

Published

tsconfig.json inheritance via Node.js packages

Downloads

1,493

Readme

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

v4.9 (Jan 11, 2023)

  1. Requires Node.js v18 or above
  2. Requires NPM v9 or above
  3. Upgrade to TypeScript 4.9

v4.6 (Nov 27, 2021)

Speed up ts-node with Rust TypeScript runtime.

  1. add ts-node.transpileOnly: true
  2. add ts-node.transpiler: "ts-node/transpilers/swc-experimental"

v1.0 (Oct 24, 2021)

Major changes

  1. Default ES Modules: "module": "es2020"
  2. Default "target": "es2020"
  3. TypeScript version 4.4

Minor changes

  1. Add "isolatedModules": true
  2. Add "importsNotUsedAsValues": "error"
  3. Add "moduleResolution": "node"

See: Intro to the TSConfig Reference:

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 (李卓桓) [email protected]

Profile of Huan LI (李卓桓) on StackOverflow

COPYRIGHT & LICENSE

  • Code & Docs © 2019 - now Huan LI [email protected]
  • Code released under the Apache-2.0 License
  • Docs released under Creative Commons