From 204573f7aa787403fd9eae46ede32811515b34f0 Mon Sep 17 00:00:00 2001 From: str Date: Sat, 24 Jun 2023 19:06:20 +0200 Subject: [PATCH 1/2] Fix order of options in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4f5127e..b118b08 100644 --- a/README.md +++ b/README.md @@ -48,9 +48,9 @@ ts-unused-exports path/to/tsconfig.json [file1.ts ...] [options] | `exitWithUnusedTypesCount` | Set the process exit code to be the total count of unused exported types. | `--exitWithUnusedTypesCount` | | `findCompletelyUnusedFiles` | Find all *completely* unused files (where *all* exports are unused). | `--findCompletelyUnusedFiles` | | `ignoreFiles` | Ignore files with filenames that match the given regex. Use this to exclude groups of files - for example test files and their utilities. | `--ignoreFiles=.*spec` | +| `ignoreLocallyUsed` | Exports which are used in the same file they are defined in won't be reported as unused. Note that this may have an impact on performance in larger codebases. | `--ignoreLocallyUsed` | | `ignoreProductionFiles` | Only scan **test** files (so ignore non-test 'production' files). | `--ignoreProductionFiles` | | `ignoreTestFiles` | Only scan **production** files (ignore all test files, like `spec.ts(x)` or `test.ts(x)` or `TestUtils.ts`). Use this to detect production code that is only used in tests (so is dead code). Note: this will NOT detect unused exports in test code - for that, you can run `ts-unused-exports` separately with the `--ignoreProductionFiles` option. | `--ignoreTestFiles` | -| `ignoreLocallyUsed` | Exports which are used in the same file they are defined in won't be reported as unused. Note that this may have an impact on performance in larger codebases. | `--ignoreLocallyUsed` | | `maxIssues` | Return successfully for up to a given number of modules with unused exports. | `--maxIssues=7` | | `searchNamespaces` | Enable searching for unused exports within namespaces. Note: this can affect performance on large codebases. | `--searchNamespaces` | | `showLineNumber` | Show the line number and column of the unused export. | `--showLineNumber` | From d5c0f32223fd87937a728053154b025c0ed774f5 Mon Sep 17 00:00:00 2001 From: str Date: Sat, 24 Jun 2023 19:10:35 +0200 Subject: [PATCH 2/2] Improve the release test --- example/library-usage-via-TypeScript/build.sh | 1 + 1 file changed, 1 insertion(+) create mode 100644 example/library-usage-via-TypeScript/build.sh diff --git a/example/library-usage-via-TypeScript/build.sh b/example/library-usage-via-TypeScript/build.sh new file mode 100644 index 0000000..fcdbcdf --- /dev/null +++ b/example/library-usage-via-TypeScript/build.sh @@ -0,0 +1 @@ +npm i ts-unused-exports@latest && npm run-script build