In some projects there can sometimes be files with exports that are being used by the deployment provider but unused in the project itself. An example of such provider is Firebase Cloud Functions where the index.ts file exports one variable per function. An example of such a project can look like this:
folder/a.ts
export function a() {
return 0;
}
folder/b.ts
export function b() {
return 0;
}
folder/index.ts
export { a } from './a';
export { b } from './b';
Currently it is possible to ignore files from being analyzed using regex, in this case index.ts. However, since the file is ignored, fileA.ts and fileB.ts will now have unused exports.
Using the excludePathsFromReport it is possible to exclude files separated by semi-colons. In larger projects this becomes trick very easily, especially with long folder names. Since the ignoreFiles option already supports regex, a suggestion is to add support for regex for the excludePathsFromReport option as well for consistency.
In some projects there can sometimes be files with exports that are being used by the deployment provider but unused in the project itself. An example of such provider is Firebase Cloud Functions where the
index.ts
file exports one variable per function. An example of such a project can look like this:folder/a.ts
folder/b.ts
folder/index.ts
Currently it is possible to ignore files from being analyzed using regex, in this case
index.ts
. However, since the file is ignored,fileA.ts
andfileB.ts
will now have unused exports.Using the
excludePathsFromReport
it is possible to exclude files separated by semi-colons. In larger projects this becomes trick very easily, especially with long folder names. Since theignoreFiles
option already supports regex, a suggestion is to add support for regex for theexcludePathsFromReport
option as well for consistency.