Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Resolve violations of no-throw-literal lint
Resolves #204
  • Loading branch information
Michael Huynh committed Sep 25, 2020
1 parent f2e557e commit 476bf86
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion .eslintrc.json
@@ -48,7 +48,6 @@
"github/no-then": "off",
"import/no-extraneous-dependencies": "off",
"no-shadow": "off",
"no-throw-literal": "off",
"no-useless-escape": "off",
"sort-imports": "off"
}
2 changes: 1 addition & 1 deletion lib/upload-lib.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/upload-lib.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/upload-lib.ts
@@ -26,7 +26,9 @@ export function combineSarifFiles(sarifFiles: string[]): string {
if (combinedSarif.version === null) {
combinedSarif.version = sarifObject.version;
} else if (combinedSarif.version !== sarifObject.version) {
throw `Different SARIF versions encountered: ${combinedSarif.version} and ${sarifObject.version}`;
throw new Error(
`Different SARIF versions encountered: ${combinedSarif.version} and ${sarifObject.version}`
);
}

combinedSarif.runs.push(...sarifObject.runs);

0 comments on commit 476bf86

Please sign in to comment.