diff --git a/.husky/commit-msg b/.husky/commit-msg index 965ca1c..7d0c6fa 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1 +1 @@ -pnpm dlx commitlint --edit ${1} +pnpm exec commitlint --edit ${1} \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 7d2b698..42ff843 100644 --- a/src/index.ts +++ b/src/index.ts @@ -27,6 +27,7 @@ export interface IstanbulPluginOptions { cwd?: string; nycrcPath?: string; generatorOpts?: GeneratorOptions; + coverageVariable?: string; onCover?: (fileName: string, fileCoverage: object) => void; } @@ -120,6 +121,7 @@ export default function istanbulPlugin( autoWrap: true, esModules: true, compact: false, + coverageVariable: opts.coverageVariable ?? '__coverage__', generatorOpts: { ...opts?.generatorOpts }, });