Skip to content

Commit 196ae3a

Browse files
marcdumais-workbhufmann
authored andcommitted
Adapt after adding local traceviewer-* libs as subtrees
Small adaptations to root package.json, various tsconfig.json. Signed-off-by: Marc Dumais <[email protected]> Add README under local-libs Signed-off-by: Marc Dumais <[email protected]> [traceviewer-react] add missing @types/lodash.debounce dev dependency Signed-off-by: Marc Dumais <[email protected]> Align eslint config with theia-trace-extension For smoother sharing of the traceviewer-* libraries Signed-off-by: Marc Dumais <[email protected]> [traceviewer-*] align code to respect linter and formatter Signed-off-by: Marc Dumais <[email protected]> update yarn.lock Signed-off-by: Marc Dumais <[email protected]> Improved watch mode With a correct tsconfig.json setup, it's possible to watch all the typescript workspaces' code using a single "tsc -b -w", executed at the repo root. It's also necessary to cover webpack where it is used. https://webpack.js.org/configuration/watch Signed-off-by: Marc Dumais <[email protected]> Update root README Signed-off-by: Marc Dumais <[email protected]>
1 parent 5a175c2 commit 196ae3a

File tree

9 files changed

+23
-21
lines changed

9 files changed

+23
-21
lines changed

base/.eslintrc.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ module.exports = {
1313
},
1414
extends: [
1515
'plugin:@typescript-eslint/recommended',
16-
'../../configs/base.eslintrc.json',
17-
'../../configs/warnings.eslintrc.json',
18-
'../../configs/errors.eslintrc.json'
16+
'../../../configs/base.eslintrc.json',
17+
'../../../configs/warnings.eslintrc.json',
18+
'../../../configs/errors.eslintrc.json',
19+
"prettier"
1920
],
2021
ignorePatterns: [
2122
'node_modules',

base/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
"lint": "eslint .",
3535
"lint:fix": "eslint . --fix",
3636
"test": "echo 'test'",
37-
"watch": "tsc -w",
3837
"format:write": "prettier --write ./src",
3938
"format:check": "prettier --check ./src"
4039
}

react-components/.eslintrc.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ module.exports = {
1717
extends: [
1818
'plugin:react/recommended',
1919
'plugin:@typescript-eslint/recommended',
20-
'../../configs/base.eslintrc.json',
21-
'../../configs/warnings.eslintrc.json',
22-
'../../configs/errors.eslintrc.json'
20+
'../../../configs/base.eslintrc.json',
21+
'../../../configs/warnings.eslintrc.json',
22+
'../../../configs/errors.eslintrc.json',
23+
"prettier"
2324
],
2425
ignorePatterns: [
2526
'node_modules',

react-components/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"@types/d3": "^7.1.0",
4545
"@types/jest": "^28.0.0",
4646
"@types/lodash": "^4.14.142",
47+
"@types/lodash.debounce": "4.0.3",
4748
"@types/react-grid-layout": "^1.1.1",
4849
"@types/react-modal": "^3.8.2",
4950
"@types/react-test-renderer": "^18.3.0",
@@ -57,6 +58,7 @@
5758
"jest": "^28.1.3",
5859
"jest-canvas-mock": "^2.4.0",
5960
"jest-environment-jsdom": "^28.1.3",
61+
"prettier": "^3.6.2",
6062
"react-test-renderer": "^18.2.0",
6163
"rimraf": "^5.0.0",
6264
"ts-jest": "^28.0.8",
@@ -68,7 +70,6 @@
6870
"lint": "eslint .",
6971
"lint:fix": "eslint . --fix",
7072
"test": "jest --config jest.config.json",
71-
"watch": "tsc -b -w",
7273
"format:write": "prettier --write ./src",
7374
"format:check": "prettier --check ./src"
7475
}

react-components/src/components/abstract-gantt-output-component.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,8 +537,8 @@ export abstract class AbstractGanttOutputComponent<
537537
return this.state.markerCategoryEntries.length <= 1
538538
? 0
539539
: this.state.collapsedMarkerNodes.length
540-
? rowHeight
541-
: this.state.markerCategoryEntries.length * rowHeight + scrollbarHeight;
540+
? rowHeight
541+
: this.state.markerCategoryEntries.length * rowHeight + scrollbarHeight;
542542
}
543543

544544
abstract renderTree(): React.ReactNode;

react-components/src/components/abstract-xy-output-component.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -383,12 +383,12 @@ export abstract class AbstractXYOutputComponent<
383383
d >= 1000000000000
384384
? Math.round(d / 100000000000) / 10 + 'G'
385385
: d >= 1000000000
386-
? Math.round(d / 100000000) / 10 + 'B'
387-
: d >= 1000000
388-
? Math.round(d / 100000) / 10 + 'M'
389-
: d >= 1000
390-
? Math.round(d / 100) / 10 + 'K'
391-
: Math.round(d * 10) / 10;
386+
? Math.round(d / 100000000) / 10 + 'B'
387+
: d >= 1000000
388+
? Math.round(d / 100000) / 10 + 'M'
389+
: d >= 1000
390+
? Math.round(d / 100) / 10 + 'K'
391+
: Math.round(d * 10) / 10;
392392

393393
if (this.state.allMax > 0) {
394394
select(this.yAxisRef.current)

react-components/src/components/data-providers/tsp-data-provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export class TspDataProvider {
197197
start: arrow.start - offset,
198198
end: arrow.end - offset
199199
} as TimelineChart.TimeGraphRange
200-
} as TimelineChart.TimeGraphArrow)
200+
}) as TimelineChart.TimeGraphArrow
201201
);
202202
return arrows;
203203
}

react-components/src/components/utils/xy-output-component-utils.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ export function drawSelection(params: DrawSelectionParams): void {
130130
const { startPixel, endPixel, isBarPlot, chartArea, props, ctx, invertSelection } = params;
131131
const minPixel = Math.min(startPixel, endPixel);
132132
const maxPixel = Math.max(startPixel, endPixel);
133-
const initialPoint = isBarPlot ? 0 : chartArea?.left ?? 0;
133+
const initialPoint = isBarPlot ? 0 : (chartArea?.left ?? 0);
134134
const chartHeight = parseInt(props.style.height.toString());
135-
const finalPoint = isBarPlot ? chartHeight : chartArea?.bottom ?? 0;
135+
const finalPoint = isBarPlot ? chartHeight : (chartArea?.bottom ?? 0);
136136

137137
if (ctx) {
138138
ctx.save();

react-components/src/components/xy-output-component.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,9 @@ export class XYOutputComponent extends AbstractXYOutputComponent<AbstractOutputP
185185
) {
186186
const minPixel = Math.min(startPixel, endPixel);
187187
const maxPixel = Math.max(startPixel, endPixel);
188-
const initialPoint = this.isBarPlot ? 0 : chartArea?.left ?? 0;
188+
const initialPoint = this.isBarPlot ? 0 : (chartArea?.left ?? 0);
189189
const chartHeight = parseInt(this.props.style.height.toString());
190-
const finalPoint = this.isBarPlot ? chartHeight : chartArea?.bottom ?? 0;
190+
const finalPoint = this.isBarPlot ? chartHeight : (chartArea?.bottom ?? 0);
191191
if (ctx) {
192192
ctx.save();
193193

0 commit comments

Comments
 (0)