Skip to content

Commit

Permalink
Ignore unused locals by default (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy-mitchell committed Mar 15, 2023
1 parent 2dc5358 commit 223d6a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 7 additions & 4 deletions readme.md
Expand Up @@ -218,9 +218,12 @@ By default, `tsd` applies the following configuration:
"dom.iterable"
],
"module": "commonjs",
// The following option is set and is not overridable.
// It is set to `nodenext` if `module` is `nodenext`, `node16` if `module` is `node16` or `node` otherwise.
"moduleResolution": "node" | "node16" | "nodenext"
"esModuleInterop": true,
"noUnusedLocals": false,
// The following options are set and are not overridable.
// Set to `nodenext` if `module` is `nodenext`, `node16` if `module` is `node16` or `node` otherwise.
"moduleResolution": "node" | "node16" | "nodenext",
"skipLibCheck": false
}
```

Expand All @@ -237,7 +240,7 @@ These options will be overridden if a `tsconfig.json` file is found in your proj
}
```

*Default options will apply if you don't override them explicitly.* You can't override the `moduleResolution` option.
*Default options will apply if you don't override them explicitly. You can't override the `moduleResolution` or `skipLibCheck` options.*

### Via the CLI

Expand Down
1 change: 1 addition & 0 deletions source/lib/config.ts
Expand Up @@ -44,6 +44,7 @@ export default (pkg: PackageJsonWithTsdConfig, cwd: string): Config => {
module,
target: ScriptTarget.ES2020,
esModuleInterop: true,
noUnusedLocals: false,
...combinedCompilerOptions,
moduleResolution: module === ModuleKind.NodeNext ?
ModuleResolutionKind.NodeNext :
Expand Down

0 comments on commit 223d6a2

Please sign in to comment.