Skip to content

Commit

Permalink
refactor: fix typescript-eslint annotations (#1146)
Browse files Browse the repository at this point in the history
* refactor: fix typescript-eslint annotations

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>

* chore: pin dev deps

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>

---------

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
  • Loading branch information
jkowalleck committed Jan 20, 2024
1 parent 35c0bc5 commit eb57e4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"eslint": "8.56.0",
"eslint-config-standard": "17.1.0",
"eslint-config-standard-with-typescript": "43.0.0",
"@typescript-eslint/eslint-plugin": "6.18.1",
"eslint-plugin-header": "3.1.1",
"eslint-plugin-simple-import-sort": "10.0.0",
"fast-glob": "^3.2.11",
Expand Down
5 changes: 3 additions & 2 deletions src/builders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -528,10 +528,11 @@ export class BomBuilder {
// even private packages may have a PURL for identification
component.purl = this.makePurl(component)

/* eslint-disable-next-line @typescript-eslint/strict-boolean-expressions -- since empty-string handling is needed */
/* eslint-disable @typescript-eslint/strict-boolean-expressions, @typescript-eslint/prefer-nullish-coalescing
-- since empty-string handling is needed */
component.bomRef.value = (typeof data._id === 'string' ? data._id : undefined) ||
/* eslint-disable-next-line @typescript-eslint/strict-boolean-expressions, @typescript-eslint/prefer-nullish-coalescing -- since empty-string handling is needed */
`${component.group || '-'}/${component.name}@${component.version || '-'}`
/* eslint-enable @typescript-eslint/strict-boolean-expressions, @typescript-eslint/prefer-nullish-coalescing */

return component
}
Expand Down

0 comments on commit eb57e4c

Please sign in to comment.