Skip to content

Commit

Permalink
Disable no-shadow in codemod tests. Remove unhandled transformation t…
Browse files Browse the repository at this point in the history
…o appease TypeScript.
  • Loading branch information
bernardobelchior committed Feb 7, 2025
1 parent 0fa5d69 commit 9e45213
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-restricted-imports */
/* eslint-disable no-restricted-imports, @typescript-eslint/no-shadow */
import * as React from 'react';
import { SparkLineChart } from '@mui/x-charts';

Expand All @@ -13,7 +13,6 @@ function Chart() {
<SparkLineChart data={data} colors={['red']} />
<SparkLineChart data={data} colors={fn} />
<SparkLineChart data={data} colors={(mode) => (mode === 'light' ? ['black'] : ['white'])} />
<SparkLineChart data={data} colors="red" />
</React.Fragment>
);
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-restricted-imports */
/* eslint-disable no-restricted-imports, @typescript-eslint/no-shadow */
import * as React from 'react';
import { SparkLineChart } from '@mui/x-charts';

Expand All @@ -13,7 +13,6 @@ function Chart() {
<SparkLineChart data={data} color={['red']?.[0]} />
<SparkLineChart data={data} color={typeof fn === "function" ? mode => fn(mode)?.[0] : fn} />
<SparkLineChart data={data} color={mode => (mode => (mode === 'light' ? ['black'] : ['white']))(mode)?.[0]} />
<SparkLineChart data={data} colors="red" />
</React.Fragment>)
);
}

0 comments on commit 9e45213

Please sign in to comment.