Skip to content

Commit

Permalink
refactor:Add a source property to Warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
fabnguess committed Nov 25, 2023
1 parent 653a8c0 commit 6644736
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/warnings.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const warnings = Object.freeze({
});

export function generateWarning(kind, options) {
const { location, file = null, value = null, source = "JS-X-Ray"} = options;
const { location, file = null, value = null, source = null } = options;

if (kind === "encoded-literal") {
return Object.assign(
Expand Down
2 changes: 1 addition & 1 deletion types/warnings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface WarningDefault {
kind: WarningName;
file?: string;
value: string;
source: "JS-X-Ray" | "Scanner";
source?: string;
location: WarningLocation | WarningLocation[];
i18n: string;
severity: "Information" | "Warning" | "Critical";
Expand Down

0 comments on commit 6644736

Please sign in to comment.