Azure / Azure/Connectors-NodeJS-SDK

Fix tsconfig.json: remove lib, add importHelpers and allowSyntheticDefaultImports

Open
#32 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
0
Forks
4
Avg merge
2d 2m
Merged PRs (30d)
14

Description

## Context

`tsconfig.json` violates three Azure SDK TypeScript compiler settings guidelines.

## Issues

### 1. `"lib"` should not be set

```json
"lib": ["ES2023"] // ← remove this
```

Azure SDK guidelines: **DO NOT** set the `lib` compiler option. Setting it overrides the TypeScript default and can cause mismatches when the package is consumed in environments targeting a different lib set. TypeScript infers the correct lib from `target`.

### 2. Missing `"importHelpers": true`

```json
"importHelpers": true // ← add this
```

Required to use `tslib` helpers instead of inlining them, reducing bundle size for consumers.

### 3. Missing `"allowSyntheticDefaultImports": true`

```json
"allowSyntheticDefaultImports": true // ← add this
```

Required for consistent interop with CommonJS modules that lack a default export. Already implied by `esModuleInterop: true` but should be explicit per guidelines.

## Proposed change

```diff
-"lib": ["ES2023"],
"strict": true,
"esModuleInterop": true,
+"importHelpers": true,
+"allowSyntheticDefaultImports": true,
```

Add `tslib` as a dependency: `npm install tslib`.

## Azure SDK guideline

[TypeScript compiler configuration](https://azure.github.io/azure-sdk/typescript_design.html#ts-tsconfig)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.