Skip to content

Commit

Permalink
Upgrades ESLint to Version 9 (#2958)
Browse files Browse the repository at this point in the history
  • Loading branch information
carbonrobot authored Nov 11, 2024
1 parent 59afa92 commit 150db93
Show file tree
Hide file tree
Showing 164 changed files with 1,121 additions and 1,411 deletions.
12 changes: 0 additions & 12 deletions .eslintignore

This file was deleted.

116 changes: 0 additions & 116 deletions .eslintrc.js

This file was deleted.

5 changes: 0 additions & 5 deletions config/.eslintrc

This file was deleted.

4 changes: 2 additions & 2 deletions config/webpack/demo/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const glob = require("glob");
const LodashModuleReplacementPlugin = require("lodash-webpack-plugin");
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");

const ROOT = path.resolve(__dirname, "../../.."); // eslint-disable-line no-undef
const ROOT = path.resolve(__dirname, "../../..");
const PKGS = path.join(ROOT, "packages");
const VICTORY_GLOB = path
.join(PKGS, "victory*/package.json")
Expand Down Expand Up @@ -50,7 +50,7 @@ module.exports = {
include: [DEMO],
use: {
loader: "babel-loader",
// eslint-disable-next-line global-require

options: require("../../../.babelrc.js"),
},
},
Expand Down
2 changes: 1 addition & 1 deletion config/webpack/demo/webpack.config.hot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const base = require("./webpack.config.dev");

// Clone our own module object.
const mod = _.cloneDeep(base.module);
const firstLoader = mod.rules[0]; // eslint-disable-line no-magic-numbers
const firstLoader = mod.rules[0];

// Update rules array. First loader needs react-hot-loader.
firstLoader.rules = [require.resolve("react-hot-loader")]
Expand Down
2 changes: 1 addition & 1 deletion config/webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module.exports = {
include: [SRC],
use: {
loader: "babel-loader",
// eslint-disable-next-line global-require

options: require("../../.babelrc.js"),
},
},
Expand Down
20 changes: 0 additions & 20 deletions demo/ts/.eslintrc

This file was deleted.

1 change: 1 addition & 0 deletions demo/ts/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,4 +289,5 @@ class App extends React.Component<any, AppState> {
}
}

// eslint-disable-next-line react/no-deprecated
ReactDOM.render(<App />, document.getElementById("content"));
2 changes: 1 addition & 1 deletion demo/ts/components/accessibility-demo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-magic-numbers */
import React from "react";
import { isNumber } from "lodash";
import { VictoryGroup } from "victory-group";
Expand Down
2 changes: 1 addition & 1 deletion demo/ts/components/animation-demo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-magic-numbers */
import React from "react";
import { random, range } from "lodash";
import { VictoryBar } from "victory-bar";
Expand Down
2 changes: 1 addition & 1 deletion demo/ts/components/canvas-demo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-magic-numbers */
import React from "react";

import { range, random } from "lodash";
Expand Down
2 changes: 1 addition & 1 deletion demo/ts/components/create-container-demo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-magic-numbers,react/no-multi-comp */
import React from "react";
import { round } from "lodash";
import { VictoryChart } from "victory-chart";
Expand Down
3 changes: 2 additions & 1 deletion demo/ts/components/draggable-demo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-magic-numbers,react/no-multi-comp */

import React from "react";
import { VictoryChart } from "victory-chart";
Expand Down Expand Up @@ -36,6 +36,7 @@ interface DraggableDemoInterface {

interface TargetPropsInterface {
scale?: number;
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
onPointChange?: Function;
datum?: {};
}
Expand Down
2 changes: 1 addition & 1 deletion demo/ts/components/events-demo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-magic-numbers */
import React from "react";
import { VictoryChart } from "victory-chart";
import { VictoryStack } from "victory-stack";
Expand Down
2 changes: 1 addition & 1 deletion demo/ts/components/external-events-demo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-magic-numbers */

import React from "react";
import { VictoryChart } from "victory-chart";
Expand Down
2 changes: 1 addition & 1 deletion demo/ts/components/group-demo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-magic-numbers */
import React from "react";
import { VictoryChart } from "victory-chart";
import { VictoryStack } from "victory-stack";
Expand Down
2 changes: 1 addition & 1 deletion demo/ts/components/horizontal-demo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-magic-numbers */

import React from "react";
import { VictoryChart } from "victory-chart";
Expand Down
5 changes: 2 additions & 3 deletions demo/ts/components/immutable-demo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-magic-numbers, react/no-multi-comp */
import React from "react";
import { keys, random, range, round } from "lodash";
import { fromJS } from "immutable";
Expand All @@ -20,7 +20,6 @@ import { VictorySelectionContainer } from "victory-selection-container";
import { VictoryCursorContainer } from "victory-cursor-container";
import { VictoryBrushContainer } from "victory-brush-container";
import { VictoryTooltip } from "victory-tooltip";
import { VictoryLegend } from "victory-legend";
import {
DomainTuple,
VictoryClipContainer,
Expand Down Expand Up @@ -105,7 +104,7 @@ export default class ImmutableDemo extends React.Component<
}

componentDidMount() {
/* eslint-disable react/no-did-mount-set-state */
this.setStateInterval = window.setInterval(() => {
this.setState({
scatterData: this.getScatterData(),
Expand Down
2 changes: 1 addition & 1 deletion demo/ts/components/primitives-demo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-magic-numbers */
import React from "react";

import { VictoryAxis } from "victory-axis";
Expand Down
2 changes: 1 addition & 1 deletion demo/ts/components/selection-demo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-magic-numbers */
import React from "react";
import { VictoryChart } from "victory-chart";
import { VictoryStack } from "victory-stack";
Expand Down
2 changes: 1 addition & 1 deletion demo/ts/components/victory-axis-demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default class VictoryAxisDemo extends React.Component<
}

componentDidMount() {
/* eslint-disable react/no-did-mount-set-state */
this.setStateInterval = window.setInterval(() => {
this.setState({
tickValues: this.getTickValues(),
Expand Down
2 changes: 1 addition & 1 deletion demo/ts/components/victory-box-plot-demo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-magic-numbers */
import React from "react";
import { VictoryChart } from "victory-chart";
import { VictoryBoxPlot } from "victory-box-plot";
Expand Down
2 changes: 1 addition & 1 deletion demo/ts/components/victory-brush-container-demo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-magic-numbers */
import React from "react";
import { VictoryChart } from "victory-chart";
import { VictoryStack } from "victory-stack";
Expand Down
4 changes: 2 additions & 2 deletions demo/ts/components/victory-brush-line-demo.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-magic-numbers */
/* eslint-disable no-shadow */

import React from "react";
import { VictoryChart } from "victory-chart";
Expand Down
26 changes: 0 additions & 26 deletions demo/ts/components/victory-candlestick-demo.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/* eslint-disable no-magic-numbers */
import React from "react";
import { random, range } from "lodash";
import { VictoryChart } from "victory-chart";
import { VictoryCandlestick } from "victory-candlestick";
import { VictoryTheme } from "victory-core";
Expand All @@ -18,30 +16,6 @@ interface VictoryCandlestickDemoState {
}[];
}

const getData = () => {
const colors = [
"violet",
"cornflowerblue",
"gold",
"orange",
"turquoise",
"tomato",
"greenyellow",
];
return range(50).map(() => {
return {
x: random(600),
open: random(600),
close: random(600),
high: random(450, 600),
low: random(0, 150),
size: random(15) + 3,
fill: colors[random(0, 6)],
opacity: random(0.3, 1),
};
});
};

const containerStyle: React.CSSProperties = {
display: "flex",
flexDirection: "row",
Expand Down
10 changes: 1 addition & 9 deletions demo/ts/components/victory-chart-demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
VictoryLabel,
VictoryTheme,
VictoryClipContainer,
VictoryThemeDefinition,
VictoryThemePalette,
} from "victory-core";

Expand Down Expand Up @@ -41,13 +40,6 @@ class Wrapper extends React.Component<WrapperProps> {
}
}

const dependentAxisTheme: VictoryThemeDefinition = {
...VictoryTheme.material,
dependentAxis: {
orientation: "right",
},
};

type XYNumberType = {
x: number | string;
y: number | string;
Expand Down Expand Up @@ -87,7 +79,7 @@ class VictoryChartDemo extends React.Component<any, VictoryChartDemoState> {
}

componentDidMount() {
/* eslint-disable react/no-did-mount-set-state */
this.setStateInterval = window.setInterval(() => {
this.setState({
scatterData: this.getScatterData(),
Expand Down
Loading

0 comments on commit 150db93

Please sign in to comment.