From 22ef63d64f13f937ae7affaff63e78492dfdc8ae Mon Sep 17 00:00:00 2001 From: Natan Muntean Date: Tue, 20 Feb 2024 16:32:21 +0200 Subject: [PATCH] lint --- packages/nimble-components/src/wafer-map/index.ts | 6 ++++-- .../src/wafer-map/modules/matrix-renderer.ts | 6 ++++-- .../nimble-components/src/wafer-map/tests/sets.ts | 5 ++++- .../src/wafer-map/tests/wafer-map.spec.ts | 5 ++++- .../src/wafer-map/tests/wafer-map.stories.ts | 14 +++++++++----- 5 files changed, 25 insertions(+), 11 deletions(-) diff --git a/packages/nimble-components/src/wafer-map/index.ts b/packages/nimble-components/src/wafer-map/index.ts index 2acf58bdd0..05a806cc0b 100644 --- a/packages/nimble-components/src/wafer-map/index.ts +++ b/packages/nimble-components/src/wafer-map/index.ts @@ -150,13 +150,15 @@ export class WaferMap extends FoundationElement { @observable public highlightedTags: string[] = []; @observable public dies: WaferMapDie[] = []; - @observable public diesTable: Table<{ + @observable public diesTable: + | Table<{ colIndex: Int32, rowIndex: Int32, value: Float32, tags: Uint32, metadata: never - }> | undefined; + }> + | undefined; @observable public colorScale: WaferMapColorScale = { colors: [], diff --git a/packages/nimble-components/src/wafer-map/modules/matrix-renderer.ts b/packages/nimble-components/src/wafer-map/modules/matrix-renderer.ts index 365d7f33b5..ab2178a14a 100644 --- a/packages/nimble-components/src/wafer-map/modules/matrix-renderer.ts +++ b/packages/nimble-components/src/wafer-map/modules/matrix-renderer.ts @@ -14,7 +14,9 @@ export class MatrixRenderer { public drawWafer(): void { // rendering will be implemented in a future PR - this.wafermap.$emit('render-complete', { count: this.wafermap.diesTable?.numRows }); + this.wafermap.$emit('render-complete', { + count: this.wafermap.diesTable?.numRows + }); } public renderHover(): void { @@ -50,4 +52,4 @@ export class MatrixRenderer { } return ''; } -} \ No newline at end of file +} diff --git a/packages/nimble-components/src/wafer-map/tests/sets.ts b/packages/nimble-components/src/wafer-map/tests/sets.ts index b30dd9e642..4c72d2f488 100644 --- a/packages/nimble-components/src/wafer-map/tests/sets.ts +++ b/packages/nimble-components/src/wafer-map/tests/sets.ts @@ -111,7 +111,10 @@ export const wafermapDiesTableSets: Table<{ tableFromArrays({ colIndex: Int32Array.from([0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 4]), rowIndex: Int32Array.from([2, 2, 1, 3, 2, 1, 0, 3, 4, 2, 1, 3, 2]), - value: Float32Array.from([14.24, 76.43, 44.63, 67.93, 72.71, 79.04, 26.49, 37.79, 59.82, 52.90, 98.50, 20.83, 62.80]), + value: Float32Array.from([ + 14.24, 76.43, 44.63, 67.93, 72.71, 79.04, 26.49, 37.79, 59.82, 52.9, + 98.5, 20.83, 62.8 + ]), tags: Uint32Array.from([ 0b000011, // a, b 0b000110, // b, c diff --git a/packages/nimble-components/src/wafer-map/tests/wafer-map.spec.ts b/packages/nimble-components/src/wafer-map/tests/wafer-map.spec.ts index 040ca3c5f8..0489ced0f8 100644 --- a/packages/nimble-components/src/wafer-map/tests/wafer-map.spec.ts +++ b/packages/nimble-components/src/wafer-map/tests/wafer-map.spec.ts @@ -106,7 +106,10 @@ describe('WaferMap', () => { }); xit('will trigger render-complete after diesTable change', async () => { - const renderCompleteListener = createEventListener(element, 'render-complete'); + const renderCompleteListener = createEventListener( + element, + 'render-complete' + ); element.diesTable = new Table(); processUpdates(); await renderCompleteListener.promise; diff --git a/packages/nimble-components/src/wafer-map/tests/wafer-map.stories.ts b/packages/nimble-components/src/wafer-map/tests/wafer-map.stories.ts index 4cd87b9b91..5485e51edc 100644 --- a/packages/nimble-components/src/wafer-map/tests/wafer-map.stories.ts +++ b/packages/nimble-components/src/wafer-map/tests/wafer-map.stories.ts @@ -94,21 +94,25 @@ const getDiesTableSet = ( tags: Uint32, metadata: never }>[] -): Table<{ +): +| Table<{ colIndex: Int32, rowIndex: Int32, value: Float32, tags: Uint32, metadata: never -}> | undefined => { +}> +| undefined => { const seed = 0.5; - let returnedValue: Table<{ + let returnedValue: + | Table<{ colIndex: Int32, rowIndex: Int32, value: Float32, tags: Uint32, metadata: never - }> | undefined; + }> + | undefined; switch (setName) { case 'fixedDies10': returnedValue = sets[0]!; @@ -288,7 +292,7 @@ const metadata: Meta = { goodDies1000: 'Large dies set of mostly good values', badDies10000: 'Very large dies set of mostly bad values' } - }, + } }, dieLabelsHidden: { name: 'die-labels-hidden',