Skip to content

Commit

Permalink
chore: upgrade typescript-eslint to v8
Browse files Browse the repository at this point in the history
  • Loading branch information
abnud11 committed Aug 10, 2024
1 parent e6edafe commit 82def9d
Show file tree
Hide file tree
Showing 21 changed files with 121 additions and 109 deletions.
144 changes: 77 additions & 67 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@
"@types/react-dom": "^18.3.0",
"@types/react-is": "^18.3.0",
"@types/react-router-dom": "^5.3.3",
"@typescript-eslint/eslint-plugin": "7.x.x",
"@typescript-eslint/parser": "7.x.x",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"@vitejs/plugin-react": "^4.3.1",
"@vitest/coverage-v8": "^2.0.4",
"babel-loader": "^9.1.3",
Expand Down
2 changes: 1 addition & 1 deletion src/cartesian/ErrorBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ function ErrorBarInternal(props: Props) {
}

// eslint-disable-next-line react/prefer-stateless-function
export class ErrorBar extends Component<Props, {}> {
export class ErrorBar extends Component<Props> {
static defaultProps = {
stroke: 'black',
strokeWidth: 1.5,
Expand Down
2 changes: 1 addition & 1 deletion src/cartesian/Line.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ class LineWithState extends Component<InternalProps, State> {

try {
return (curveDom && curveDom.getTotalLength && curveDom.getTotalLength()) || 0;
} catch (err) {
} catch {
return 0;
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/chart/generateCategoricalChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ export type CategoricalChartFunc = (nextState: CategoricalChartState, event: any

export interface CategoricalChartProps {
syncId?: number | string;
syncMethod?: 'index' | 'value' | Function;
syncMethod?: 'index' | 'value' | ((ticks: TickItem[], data: CategoricalChartState) => number);
compact?: boolean;
width?: number;
height?: number;
Expand Down Expand Up @@ -1020,7 +1020,7 @@ export const generateCategoricalChart = ({
class CategoricalChartWrapper extends Component<CategoricalChartProps, CategoricalChartState> {
static displayName = chartName;

readonly eventEmitterSymbol: Symbol = Symbol('rechartsEventEmitter');
readonly eventEmitterSymbol = Symbol('rechartsEventEmitter');

clipPathId: string;

Expand Down Expand Up @@ -1441,7 +1441,7 @@ export const generateCategoricalChart = ({
}
};

handleReceiveSyncEvent = (cId: number | string, data: CategoricalChartState, emitter: Symbol) => {
handleReceiveSyncEvent = (cId: number | string, data: CategoricalChartState, emitter: symbol) => {
if (this.props.syncId === cId) {
if (emitter === this.eventEmitterSymbol && typeof this.props.syncMethod !== 'function') {
return;
Expand Down
2 changes: 1 addition & 1 deletion src/component/Label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export type LabelPosition =
interface LabelProps {
viewBox?: ViewBox;
parentViewBox?: ViewBox;
formatter?: Function;
formatter?: (label: React.ReactNode) => React.ReactNode;
value?: number | string;
offset?: number;
position?: LabelPosition;
Expand Down
Loading

0 comments on commit 82def9d

Please sign in to comment.