chore: TypeScript Configuration Modernization and Cleanup (#35159)

This commit is contained in:
Michael S. Molina
2025-09-18 16:27:57 -03:00
committed by GitHub
parent a889ae75fc
commit 6cb3ef9f5d
69 changed files with 392 additions and 481 deletions

View File

@@ -30,6 +30,7 @@
"lodash": "^4.17.21"
},
"peerDependencies": {
"@apache-superset/core": "*",
"@superset-ui/chart-controls": "*",
"@superset-ui/core": "*",
"echarts": "*",

View File

@@ -16,8 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc';
import { Metric } from '@superset-ui/chart-controls';
import {
ChartProps,
@@ -27,6 +25,8 @@ import {
SimpleAdhocFilter,
ensureIsArray,
} from '@superset-ui/core';
import { extendedDayjs as dayjs } from '@superset-ui/core/utils/dates';
import 'dayjs/plugin/utc';
import {
getComparisonFontSize,
getHeaderFontSize,
@@ -35,8 +35,6 @@ import {
import { getOriginalLabel } from '../utils';
dayjs.extend(utc);
export const parseMetricValue = (metricValue: number | string | null) => {
if (typeof metricValue === 'string') {
const dateObject = dayjs.utc(metricValue, undefined, true);

View File

@@ -17,7 +17,6 @@
* under the License.
*/
import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc';
import {
getTimeFormatter,
@@ -29,6 +28,7 @@ import {
SMART_DATE_ID,
TimeGranularity,
} from '@superset-ui/core';
import { extendedDayjs as dayjs } from '@superset-ui/core/utils/dates';
dayjs.extend(utc);

View File

@@ -33,8 +33,8 @@ import {
t,
tooltipHtml,
} from '@superset-ui/core';
import { extendedDayjs as dayjs } from '@superset-ui/core/utils/dates';
import { CallbackDataParams } from 'echarts/types/src/util/types';
import dayjs from 'dayjs';
import {
Cartesian2dCoordSys,
EchartsGanttChartProps,

View File

@@ -23,8 +23,7 @@ import {
SqlaFormData,
supersetTheme,
} from '@superset-ui/core';
import { EchartsBubbleChartProps } from 'plugins/plugin-chart-echarts/src/Bubble/types';
import { EchartsBubbleChartProps } from '../../src/Bubble/types';
import transformProps, { formatTooltip } from '../../src/Bubble/transformProps';
const defaultFormData: SqlaFormData = {

View File

@@ -2,21 +2,8 @@
"compilerOptions": {
"composite": false,
"emitDeclarationOnly": false,
"noEmit": true,
"rootDir": "."
},
"extends": "../../../tsconfig.json",
"include": [
"**/*",
"../types/**/*",
"../../../types/**/*"
],
"references": [
{
"path": "../../../packages/superset-ui-chart-controls"
},
{
"path": "../../../packages/superset-ui-core"
}
]
"include": ["**/*", "../types/**/*", "../../../types/**/*"]
}

View File

@@ -1,17 +1,18 @@
{
"extends": "../../tsconfig.base.json",
"extends": "../../tsconfig.json",
"compilerOptions": {
"composite": true,
"rootDir": "src",
"outDir": "lib",
"baseUrl": ".",
"paths": {
"@superset-ui/core/components": ["../../packages/superset-ui-core/src/components"]
}
"baseUrl": "../..",
"outDir": "lib"
},
"include": ["src/**/*", "types/**/*"],
"exclude": ["lib", "test"],
"include": ["src/**/*.ts", "src/**/*.tsx", "types/**/*"],
"exclude": [
"src/**/*.js",
"src/**/*.jsx",
"src/**/*.test.*",
"src/**/*.stories.*"
],
"references": [
{ "path": "../../packages/superset-core" },
{ "path": "../../packages/superset-ui-core" },
{ "path": "../../packages/superset-ui-chart-controls" }
]