1.0.2 • Published 1 year ago

@codecraftbr/ts-config v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

tsconfig

Shared TypeScript config for Next Ip projects

Integrate into new project

  1. Install this package as devDependency
# with Yarn
$ yarn add -D @codecraftbr/ts-config

# with npm
$ npm i -D @codecraftbr/ts-config

This config requires TypeScript 4.7 or later.

  1. Install peer dependencies of this package in your project as devDependencies

Therefore, you can make use of the tool install-peerdeps:

# with Yarn
$ yarn dlx install-peerdeps --dev @codecraftbr/ts-config

# with npm
$ npx install-peerdeps --dev @codecraftbr/ts-config
  1. Use Typescript config in your project

tsconfig.json

{
	"extends": "@codecraftbr/tsconfig",
	"compilerOptions": {
		"baseUrl": "./",		
		"rootDir": ".",
		"outDir": "dist",
	},
	"include": ["./src/**/*.ts", "./test/**/*.ts"]
}

When you are targeting a higher version of Node.js, check the relevant ECMAScript version and add it as target:

{
	"extends": "@codecraftbr/tsconfig",
	"compilerOptions": {
		"baseUrl": "./",		
		"rootDir": ".",
		"outDir": "dist",
		"target": "ES2021"
	}
}
1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago