@oleg-ch/tsconfig

1.1.0 • Public • Published

@oleg-ch/tsconfig

Common typescript config.

All output options are disabled (declaration: false, noEmit: true). Strict type checks are enabled (e.g noImplicitAny, etc). Additional configuration may be required for using it with Webpack or Babel.

Installation

yarn add -D @oleg-ch/tsconfig

Usage

Extend your tsconfig.json:

{
    "extends": "@oleg-ch/tsconfig"
}

Babel

Add @babel/preset-typescript to your babel.config.json. Add --extensions ".js,.ts,.tsx" flag, if you use Babel CLI.

Webpack

Use @babel/preset-typescript as described above. Configure babel-loader's test regular expression to include ts and tsx files.

You can also use ts-loader.

yarn add -D ts-loader

Check the example of using ts-loader with babel-loader.

WARNING Turn off noEmit when using ts-loader with @oleg-ch/tsconfig:

{
    "extends": "@oleg-ch/tsconfig",
    "compilerOptions": {
        "noEmit": false
    }
}

For more info check ts compiler options

Readme

Keywords

none

Package Sidebar

Install

npm i @oleg-ch/tsconfig

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

4.09 kB

Total Files

5

Last publish

Collaborators

  • oleg-ch