diff --git a/demo/rn/src/screens/chart-screen.tsx b/demo/rn/src/screens/chart-screen.tsx index 3880ee9b6..01c2eb9fa 100644 --- a/demo/rn/src/screens/chart-screen.tsx +++ b/demo/rn/src/screens/chart-screen.tsx @@ -15,9 +15,8 @@ import viewStyles from "../styles/view-styles"; import { getTransitionData } from "../data"; export const ChartScreen: React.FC = () => { - const [transitionData, setTransitionData] = React.useState( - getTransitionData(), - ); + const [transitionData, setTransitionData] = + React.useState(getTransitionData()); React.useEffect(() => { const updateDataHandle = setInterval(() => { diff --git a/demo/ts/components/accessibility-demo.tsx b/demo/ts/components/accessibility-demo.tsx index fdd349f8a..a61be1207 100644 --- a/demo/ts/components/accessibility-demo.tsx +++ b/demo/ts/components/accessibility-demo.tsx @@ -1,4 +1,3 @@ - import React from "react"; import { isNumber } from "lodash"; import { VictoryGroup } from "victory-group"; @@ -87,7 +86,10 @@ export default class VictoryAccessibilityDemo extends React.Component { data-testid="bar-accessibility-chart" >

Bar chart

- + { {/** BOXPLOT */}

BoxPlot

- + { /> } /> - { style={{ data: { fill: "#18BFFF" } }} data={accessibilityAreaData.c} dataComponent={ - `area chart stack ${data?.[0]._stack}` - } - tabIndex={20.2} + } + tabIndex={20.2} /> } /> @@ -229,7 +234,10 @@ export default class VictoryAccessibilityDemo extends React.Component { {/** LINE */}

Line

- + datum.y} @@ -280,7 +288,10 @@ export default class VictoryAccessibilityDemo extends React.Component { {/** SCATTER */}

Scatter

- + { {/** VORONOI */}

Voronoi

- + { this.setState({ scatterData: this.getScatterData(), diff --git a/demo/ts/components/primitives-demo.tsx b/demo/ts/components/primitives-demo.tsx index 6d522b493..030f1e732 100644 --- a/demo/ts/components/primitives-demo.tsx +++ b/demo/ts/components/primitives-demo.tsx @@ -1,4 +1,3 @@ - import React from "react"; import { VictoryAxis } from "victory-axis"; diff --git a/demo/ts/components/selection-demo.tsx b/demo/ts/components/selection-demo.tsx index e4f34d8d3..22abdf5d8 100644 --- a/demo/ts/components/selection-demo.tsx +++ b/demo/ts/components/selection-demo.tsx @@ -1,4 +1,3 @@ - import React from "react"; import { VictoryChart } from "victory-chart"; import { VictoryStack } from "victory-stack"; diff --git a/demo/ts/components/victory-axis-demo.tsx b/demo/ts/components/victory-axis-demo.tsx index 7c89a544f..577961f7a 100644 --- a/demo/ts/components/victory-axis-demo.tsx +++ b/demo/ts/components/victory-axis-demo.tsx @@ -24,7 +24,6 @@ export default class VictoryAxisDemo extends React.Component< } componentDidMount() { - this.setStateInterval = window.setInterval(() => { this.setState({ tickValues: this.getTickValues(), diff --git a/demo/ts/components/victory-box-plot-demo.tsx b/demo/ts/components/victory-box-plot-demo.tsx index 7c13fa585..f6b17e85a 100644 --- a/demo/ts/components/victory-box-plot-demo.tsx +++ b/demo/ts/components/victory-box-plot-demo.tsx @@ -1,4 +1,3 @@ - import React from "react"; import { VictoryChart } from "victory-chart"; import { VictoryBoxPlot } from "victory-box-plot"; diff --git a/demo/ts/components/victory-brush-container-demo.tsx b/demo/ts/components/victory-brush-container-demo.tsx index 4f00bf2e9..e7b1e2f36 100644 --- a/demo/ts/components/victory-brush-container-demo.tsx +++ b/demo/ts/components/victory-brush-container-demo.tsx @@ -1,4 +1,3 @@ - import React from "react"; import { VictoryChart } from "victory-chart"; import { VictoryStack } from "victory-stack"; diff --git a/demo/ts/components/victory-brush-line-demo.tsx b/demo/ts/components/victory-brush-line-demo.tsx index 30fbf6a62..5504a90c6 100644 --- a/demo/ts/components/victory-brush-line-demo.tsx +++ b/demo/ts/components/victory-brush-line-demo.tsx @@ -1,6 +1,3 @@ - - - import React from "react"; import { VictoryChart } from "victory-chart"; import { VictoryAxis } from "victory-axis"; diff --git a/demo/ts/components/victory-chart-demo.tsx b/demo/ts/components/victory-chart-demo.tsx index 4ba3e7238..0e4c987f8 100644 --- a/demo/ts/components/victory-chart-demo.tsx +++ b/demo/ts/components/victory-chart-demo.tsx @@ -79,7 +79,6 @@ class VictoryChartDemo extends React.Component { } componentDidMount() { - this.setStateInterval = window.setInterval(() => { this.setState({ scatterData: this.getScatterData(), diff --git a/demo/ts/components/victory-cursor-container-demo.tsx b/demo/ts/components/victory-cursor-container-demo.tsx index e61e408a3..07d01f94e 100644 --- a/demo/ts/components/victory-cursor-container-demo.tsx +++ b/demo/ts/components/victory-cursor-container-demo.tsx @@ -1,4 +1,3 @@ - import React from "react"; import { random, range, round } from "lodash"; import { VictoryChart } from "victory-chart"; @@ -38,7 +37,6 @@ class App extends React.Component { } componentDidMount() { - this.setStateInterval = window.setInterval(() => { this.setState({ data: this.getData(), diff --git a/demo/ts/components/victory-demo.tsx b/demo/ts/components/victory-demo.tsx index 0bd9625dd..d2d1d0e6a 100644 --- a/demo/ts/components/victory-demo.tsx +++ b/demo/ts/components/victory-demo.tsx @@ -1,4 +1,3 @@ - import React from "react"; import { VictoryAxis } from "victory-axis"; import { VictoryArea } from "victory-area"; diff --git a/demo/ts/components/victory-errorbar-demo.tsx b/demo/ts/components/victory-errorbar-demo.tsx index 1a96bc2da..d491ba784 100644 --- a/demo/ts/components/victory-errorbar-demo.tsx +++ b/demo/ts/components/victory-errorbar-demo.tsx @@ -47,7 +47,6 @@ export default class VictoryErrorBarDemo extends React.Component< } componentDidMount() { - this.setStateInterval = window.setInterval(() => { this.setState({ data: this.getData(), diff --git a/demo/ts/components/victory-histogram-demo.tsx b/demo/ts/components/victory-histogram-demo.tsx index afa348dec..431993d20 100644 --- a/demo/ts/components/victory-histogram-demo.tsx +++ b/demo/ts/components/victory-histogram-demo.tsx @@ -122,7 +122,6 @@ export default class App extends React.Component<{}, VictoryBarDemoState> { } componentDidMount() { - this.setStateInterval = window.setInterval(() => { const randomValue = random(300); diff --git a/demo/ts/components/victory-label-demo.tsx b/demo/ts/components/victory-label-demo.tsx index 314593102..4e4f5d0e0 100644 --- a/demo/ts/components/victory-label-demo.tsx +++ b/demo/ts/components/victory-label-demo.tsx @@ -1,4 +1,3 @@ - import React from "react"; import { VictoryLabel, VictoryTheme } from "victory-core"; import { VictoryScatter, VictoryScatterProps } from "victory-scatter"; diff --git a/demo/ts/components/victory-pie-demo.tsx b/demo/ts/components/victory-pie-demo.tsx index dbb0cd9a1..ea9767a36 100644 --- a/demo/ts/components/victory-pie-demo.tsx +++ b/demo/ts/components/victory-pie-demo.tsx @@ -58,7 +58,6 @@ export default class VictoryPieDemo extends React.Component< } componentDidMount() { - this.setStateInterval = window.setInterval(() => { this.setState({ data: this.getData(), diff --git a/demo/ts/components/victory-polar-axis-demo.tsx b/demo/ts/components/victory-polar-axis-demo.tsx index db8ccc8f6..835042361 100644 --- a/demo/ts/components/victory-polar-axis-demo.tsx +++ b/demo/ts/components/victory-polar-axis-demo.tsx @@ -54,7 +54,6 @@ class App extends React.Component { } componentDidMount() { - this.setStateInterval = window.setInterval(() => { this.setState({ data: this.getData(), diff --git a/demo/ts/components/victory-scatter-demo.tsx b/demo/ts/components/victory-scatter-demo.tsx index e6069546d..f168317dd 100644 --- a/demo/ts/components/victory-scatter-demo.tsx +++ b/demo/ts/components/victory-scatter-demo.tsx @@ -1,4 +1,3 @@ - import React, { useState } from "react"; import PropTypes from "prop-types"; import { random, range } from "lodash"; @@ -11,11 +10,7 @@ import { } from "victory-core"; import bubbleData from "./bubble-data"; import symbolData from "./symbol-data"; -import { - FaMoon, - FaFootballBall, - FaSun, -} from "react-icons/fa"; +import { FaMoon, FaFootballBall, FaSun } from "react-icons/fa"; type DataType = { x?: string | number; @@ -122,7 +117,6 @@ const CustomCustomIconWithEvents = (props) => { ); }; - class CatPoint extends React.Component { static propTypes = { symbol: PropTypes.string, @@ -178,7 +172,6 @@ export default class VictoryScatterDemo extends React.Component< } componentDidMount() { - this.setStateInterval = window.setInterval(() => { this.setState({ data: getData(), @@ -229,8 +222,8 @@ export default class VictoryScatterDemo extends React.Component< data: { fill: ({ datum }) => datum.y > 0 - ? VictoryTheme.clean.palette?.colors?.red ?? "red" - : VictoryTheme.clean.palette?.colors?.blue ?? "blue", + ? (VictoryTheme.clean.palette?.colors?.red ?? "red") + : (VictoryTheme.clean.palette?.colors?.blue ?? "blue"), }, }} symbol={({ datum }) => (datum.y > 0 ? "triangleUp" : "triangleDown")} @@ -332,20 +325,20 @@ export default class VictoryScatterDemo extends React.Component< {/* custom icons */} } /> } size={25} diff --git a/demo/ts/components/victory-selection-container-demo.tsx b/demo/ts/components/victory-selection-container-demo.tsx index 5551966e9..8073171f3 100644 --- a/demo/ts/components/victory-selection-container-demo.tsx +++ b/demo/ts/components/victory-selection-container-demo.tsx @@ -53,7 +53,6 @@ class VictorySelectionContainerDemo extends React.Component { } componentDidMount() { - this.setStateInterval = window.setInterval(() => { this.setState({ data: this.getData(), diff --git a/demo/ts/components/victory-voronoi-container-demo.tsx b/demo/ts/components/victory-voronoi-container-demo.tsx index 1ae614f1d..96114e7ef 100644 --- a/demo/ts/components/victory-voronoi-container-demo.tsx +++ b/demo/ts/components/victory-voronoi-container-demo.tsx @@ -1,4 +1,3 @@ - import React from "react"; import { random, range } from "lodash"; import { VictoryChart } from "victory-chart"; @@ -55,7 +54,6 @@ export default class VictoryVoronoiContainerDemo extends React.Component< } componentDidMount() { - this.setStateInterval = window.setInterval(() => { this.setState({ data: this.getData(), diff --git a/demo/ts/components/victory-voronoi-demo.tsx b/demo/ts/components/victory-voronoi-demo.tsx index 00c194cf1..579fb58bc 100644 --- a/demo/ts/components/victory-voronoi-demo.tsx +++ b/demo/ts/components/victory-voronoi-demo.tsx @@ -1,4 +1,3 @@ - import React from "react"; import { VictoryVoronoi } from "victory-voronoi"; import { VictoryTooltip } from "victory-tooltip"; @@ -38,7 +37,6 @@ class VoronoiDemo extends React.Component { } componentDidMount() { - this.setStateInterval = window.setInterval(() => { this.setState({ data: this.getData(), diff --git a/demo/ts/components/victory-zoom-container-demo.tsx b/demo/ts/components/victory-zoom-container-demo.tsx index 432ce35ba..71328bd0c 100644 --- a/demo/ts/components/victory-zoom-container-demo.tsx +++ b/demo/ts/components/victory-zoom-container-demo.tsx @@ -1,4 +1,3 @@ - import React from "react"; import { range, random, minBy, maxBy, last } from "lodash"; import { VictoryChart } from "victory-chart"; @@ -170,7 +169,6 @@ export default class VictoryZoomContainerDemo extends React.Component< } componentDidMount() { - this.setStateInterval = window.setInterval(() => { this.setState({ data: this.getData(), diff --git a/packages/victory-native/package.json b/packages/victory-native/package.json index 548718a97..4fed9f0fc 100644 --- a/packages/victory-native/package.json +++ b/packages/victory-native/package.json @@ -243,32 +243,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [