diff --git a/.eslintrc.js b/.eslintrc.js index 9605d88..6c2a103 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -19,7 +19,8 @@ module.exports = { 'plugin:@typescript-eslint/recommended', '../../configs/base.eslintrc.json', '../../configs/warnings.eslintrc.json', - '../../configs/errors.eslintrc.json' + '../../configs/errors.eslintrc.json', + "prettier" ], ignorePatterns: [ 'node_modules', diff --git a/package.json b/package.json index 2a6405c..0409170 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "name": "traceviewer-react-components", + "private": true, "version": "0.9.1", "description": "Trace Compass react components", "license": "MIT", @@ -44,6 +45,7 @@ "@types/d3": "^7.1.0", "@types/jest": "^28.0.0", "@types/lodash": "^4.14.142", + "@types/lodash.debounce": "4.0.3", "@types/react-grid-layout": "^1.1.1", "@types/react-modal": "^3.8.2", "@types/react-test-renderer": "^18.3.0", @@ -57,6 +59,7 @@ "jest": "^28.1.3", "jest-canvas-mock": "^2.4.0", "jest-environment-jsdom": "^28.1.3", + "prettier": "^3.6.2", "react-test-renderer": "^18.2.0", "rimraf": "^5.0.0", "ts-jest": "^28.0.8", @@ -68,7 +71,6 @@ "lint": "eslint .", "lint:fix": "eslint . --fix", "test": "jest --config jest.config.json", - "watch": "tsc -b -w", "format:write": "prettier --write ./src", "format:check": "prettier --check ./src" } diff --git a/src/components/abstract-xy-output-component.tsx b/src/components/abstract-xy-output-component.tsx index 36d5d06..5d0895a 100644 --- a/src/components/abstract-xy-output-component.tsx +++ b/src/components/abstract-xy-output-component.tsx @@ -383,12 +383,12 @@ export abstract class AbstractXYOutputComponent< d >= 1000000000000 ? Math.round(d / 100000000000) / 10 + 'G' : d >= 1000000000 - ? Math.round(d / 100000000) / 10 + 'B' - : d >= 1000000 - ? Math.round(d / 100000) / 10 + 'M' - : d >= 1000 - ? Math.round(d / 100) / 10 + 'K' - : Math.round(d * 10) / 10; + ? Math.round(d / 100000000) / 10 + 'B' + : d >= 1000000 + ? Math.round(d / 100000) / 10 + 'M' + : d >= 1000 + ? Math.round(d / 100) / 10 + 'K' + : Math.round(d * 10) / 10; if (this.state.allMax > 0) { select(this.yAxisRef.current) diff --git a/src/components/data-providers/tsp-data-provider.ts b/src/components/data-providers/tsp-data-provider.ts index 95fc993..3ddcf30 100644 --- a/src/components/data-providers/tsp-data-provider.ts +++ b/src/components/data-providers/tsp-data-provider.ts @@ -197,7 +197,7 @@ export class TspDataProvider { start: arrow.start - offset, end: arrow.end - offset } as TimelineChart.TimeGraphRange - } as TimelineChart.TimeGraphArrow) + }) as TimelineChart.TimeGraphArrow ); return arrows; } diff --git a/src/components/timegraph-output-component.tsx b/src/components/timegraph-output-component.tsx index 70df1e1..794286c 100644 --- a/src/components/timegraph-output-component.tsx +++ b/src/components/timegraph-output-component.tsx @@ -546,8 +546,8 @@ export class TimegraphOutputComponent extends AbstractTreeOutputComponent