Skip to content

Commit bcf29b3

Browse files
author
Chris Raynor
authored
Merge pull request #232 from miqh/fix/204
Resolve violations of no-throw-literal lint
2 parents f2e557e + 476bf86 commit bcf29b3

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

.eslintrc.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
"github/no-then": "off",
4949
"import/no-extraneous-dependencies": "off",
5050
"no-shadow": "off",
51-
"no-throw-literal": "off",
5251
"no-useless-escape": "off",
5352
"sort-imports": "off"
5453
}

lib/upload-lib.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-lib.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/upload-lib.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ export function combineSarifFiles(sarifFiles: string[]): string {
2626
if (combinedSarif.version === null) {
2727
combinedSarif.version = sarifObject.version;
2828
} else if (combinedSarif.version !== sarifObject.version) {
29-
throw `Different SARIF versions encountered: ${combinedSarif.version} and ${sarifObject.version}`;
29+
throw new Error(
30+
`Different SARIF versions encountered: ${combinedSarif.version} and ${sarifObject.version}`
31+
);
3032
}
3133

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

0 commit comments

Comments
 (0)