Skip to content

Commit 99f62eb

Browse files
chore(deps-dev): bump the eslint group with 2 updates (#988)
* Applyied latest code standards * chore(deps-dev): bump the eslint group with 2 updates Bumps the eslint group with 2 updates: [eslint](https://github.com/eslint/eslint) and [eslint-config-standard-with-typescript](https://github.com/standard/eslint-config-standard-with-typescript). Updates `eslint` from 8.53.0 to 8.54.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](eslint/eslint@v8.53.0...v8.54.0) Updates `eslint-config-standard-with-typescript` from 39.1.1 to 40.0.0 - [Release notes](https://github.com/standard/eslint-config-standard-with-typescript/releases) - [Changelog](https://github.com/standard/eslint-config-standard-with-typescript/blob/master/CHANGELOG.md) - [Commits](mightyiam/eslint-config-love@v39.1.1...v40.0.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint - dependency-name: eslint-config-standard-with-typescript dependency-type: direct:development update-type: version-update:semver-major dependency-group: eslint ... Signed-off-by: dependabot[bot] <[email protected]> * apply latest code style guide Signed-off-by: Jan Kowalleck <[email protected]> * docs Signed-off-by: Jan Kowalleck <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Jan Kowalleck <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jan Kowalleck <[email protected]>
1 parent 1195fd0 commit 99f62eb

File tree

7 files changed

+20
-11
lines changed

7 files changed

+20
-11
lines changed

.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ module.exports = {
8282
*/
8383
fixStyle: 'separate-type-imports'
8484
}],
85+
/* @see https://typescript-eslint.io/rules/unbound-method/ */
86+
'@typescript-eslint/unbound-method': ['error', {
87+
ignoreStatic: true
88+
}],
8589
// endregion override rules from plugin 'standard-with-typescript'
8690
// region docs
8791
/* see https://github.com/microsoft/tsdoc */

HISTORY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44

55
## unreleased
66

7+
* Style
8+
* Apply latest code style guide (via [#988])
9+
10+
[#988]: https://github.com/CycloneDX/cyclonedx-javascript-library/pull/988
11+
712
## 6.1.0 -- 2023-11-05
813

914
* Added

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@
8282
"@types/spdx-expression-parse": "^3",
8383
"c8": "8.0.1",
8484
"deepmerge": "^4.2.2",
85-
"eslint": "8.53.0",
85+
"eslint": "8.54.0",
8686
"eslint-config-standard": "17.1.0",
87-
"eslint-config-standard-with-typescript": "39.1.1",
87+
"eslint-config-standard-with-typescript": "40.0.0",
8888
"eslint-plugin-header": "3.1.1",
8989
"eslint-plugin-jsdoc": "46.9.0",
9090
"eslint-plugin-simple-import-sort": "10.0.0",

src/models/hash.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ export type Hash = readonly [
3232
]
3333

3434
export class HashDictionary extends Map<Hash[0], Hash[1]> implements Sortable<Hash> {
35-
#compareItems ([a1, c1]: Hash, [a2, c2]: Hash): number {
35+
static #compareItems ([a1, c1]: Hash, [a2, c2]: Hash): number {
3636
/* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */
3737
return a1.localeCompare(a2) ||
3838
c1.localeCompare(c2)
3939
/* eslint-enable @typescript-eslint/strict-boolean-expressions */
4040
}
4141

4242
sorted (): Hash[] {
43-
return Array.from(this.entries()).sort(this.#compareItems)
43+
return Array.from(this.entries()).sort(HashDictionary.#compareItems)
4444
}
4545
}

src/models/license.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export type DisjunctiveLicense = NamedLicense | SpdxLicense
142142
export type License = DisjunctiveLicense | LicenseExpression
143143

144144
export class LicenseRepository extends Set<License> implements Sortable<License> {
145-
#compareItems (a: License, b: License): number {
145+
static #compareItems (a: License, b: License): number {
146146
if (a.constructor === b.constructor) {
147147
// @ts-expect-error -- classes are from same type -> they are comparable
148148
return a.compare(b)
@@ -151,6 +151,6 @@ export class LicenseRepository extends Set<License> implements Sortable<License>
151151
}
152152

153153
sorted (): License[] {
154-
return Array.from(this).sort(this.#compareItems)
154+
return Array.from(this).sort(LicenseRepository.#compareItems)
155155
}
156156
}

src/models/lifecycle.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class NamedLifecycle implements Comparable<NamedLifecycle> {
4141
export type Lifecycle = LifecyclePhase | NamedLifecycle
4242

4343
export class LifecycleRepository extends Set<Lifecycle> implements Sortable<Lifecycle> {
44-
#compareItems (a: Lifecycle, b: Lifecycle): number {
44+
static #compareItems (a: Lifecycle, b: Lifecycle): number {
4545
if (a.constructor === b.constructor) {
4646
return a instanceof NamedLifecycle
4747
? a.compare(b as NamedLifecycle)
@@ -51,6 +51,6 @@ export class LifecycleRepository extends Set<Lifecycle> implements Sortable<Life
5151
}
5252

5353
sorted (): Lifecycle[] {
54-
return Array.from(this).sort(this.#compareItems)
54+
return Array.from(this).sort(LifecycleRepository.#compareItems)
5555
}
5656
}

src/serialize/json/normalize.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,14 +402,14 @@ export class ComponentEvidenceNormalizer extends BaseJsonNormalizer<Models.Compo
402402
copyright: data.copyright.size > 0
403403
? (
404404
options.sortLists
405-
? data.copyright.sorted().map(this.#normalizeCopyright)
406-
: Array.from(data.copyright, this.#normalizeCopyright)
405+
? data.copyright.sorted().map(ComponentEvidenceNormalizer.#normalizeCopyright)
406+
: Array.from(data.copyright, ComponentEvidenceNormalizer.#normalizeCopyright)
407407
)
408408
: undefined
409409
}
410410
}
411411

412-
#normalizeCopyright (c: Stringable): Normalized.Copyright {
412+
static #normalizeCopyright (c: Stringable): Normalized.Copyright {
413413
return { text: c.toString() }
414414
}
415415
}

0 commit comments

Comments
 (0)