diff --git a/superset-frontend/oxlint.json b/superset-frontend/oxlint.json index abf361d9517..cce868caddd 100644 --- a/superset-frontend/oxlint.json +++ b/superset-frontend/oxlint.json @@ -39,7 +39,7 @@ // oxlint versions (not actually enforced). Documented here for future // maintainers — if/when oxlint adds them, re-enable in the relevant // plugin section above. - // import: newline-after-import, no-extraneous-dependencies, + // import: no-extraneous-dependencies, // no-import-module-exports, no-relative-packages, // no-unresolved, no-useless-path-segments // react: default-props-match-prop-types, destructuring-assignment, @@ -47,7 +47,6 @@ // forbid-prop-types, function-component-definition, // jsx-no-bind, jsx-uses-vars, no-access-state-in-setstate, // no-deprecated, no-did-update-set-state, no-typos, - // no-unstable-nested-components, // no-unused-class-component-methods, no-unused-prop-types, // no-unused-state, prefer-stateless-function, prop-types, // require-default-props, sort-comp, static-property-placement @@ -137,6 +136,7 @@ "import/no-self-import": "error", "import/no-cycle": "off", "import/prefer-default-export": "off", + "import/newline-after-import": "error", // === React plugin rules === "react/jsx-filename-extension": [ @@ -184,6 +184,10 @@ "error", { "button": true, "submit": true, "reset": false } ], + // TODO: Graduate to "error" after cleanup pass — ~150 violations + // across the codebase require hoisting nested component definitions + // out of their parent render functions. + "react/no-unstable-nested-components": "warn", // === React Hooks rules === // TODO: Fix conditional hook usage and anonymous component issues @@ -271,7 +275,10 @@ }, "overrides": [ { - "files": ["plugins/plugin-chart-table/src/TableChart.tsx", "plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.tsx"], + "files": [ + "plugins/plugin-chart-table/src/TableChart.tsx", + "plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.tsx" + ], "rules": { "jsx-a11y/no-redundant-roles": "off" } diff --git a/superset-frontend/packages/superset-ui-core/src/chart/components/SuperChart.tsx b/superset-frontend/packages/superset-ui-core/src/chart/components/SuperChart.tsx index 52a0ed6e1b7..f418775a473 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/components/SuperChart.tsx +++ b/superset-frontend/packages/superset-ui-core/src/chart/components/SuperChart.tsx @@ -48,6 +48,7 @@ import NoResultsComponent from './NoResultsComponent'; import { isMatrixifyEnabled } from '../types/matrixify'; import MatrixifyGridRenderer from './Matrixify/MatrixifyGridRenderer'; import { supersetTheme, SupersetTheme } from '@apache-superset/core/theme'; + export type FallbackPropsWithDimension = FallbackProps & Partial; export type WrapperProps = Dimension & { diff --git a/superset-frontend/src/dashboard/actions/dashboardLayout.ts b/superset-frontend/src/dashboard/actions/dashboardLayout.ts index 38030cdace2..192eaaeee86 100644 --- a/superset-frontend/src/dashboard/actions/dashboardLayout.ts +++ b/superset-frontend/src/dashboard/actions/dashboardLayout.ts @@ -34,6 +34,7 @@ import { DropResult } from 'src/dashboard/components/dnd/dragDroppableConfig'; import { GetState, LayoutItem, RootState } from '../types'; import { updateLayoutComponents } from './dashboardFilters'; import { setUnsavedChanges } from './dashboardState'; + type AppDispatch = ThunkDispatch; // Component CRUD ------------------------------------------------------------- diff --git a/superset-frontend/webpack.proxy-config.js b/superset-frontend/webpack.proxy-config.js index 8573d165178..a5bc6bc091b 100644 --- a/superset-frontend/webpack.proxy-config.js +++ b/superset-frontend/webpack.proxy-config.js @@ -21,6 +21,7 @@ const { ZSTDDecompress } = require('simple-zstd'); const yargs = require('yargs'); const { hideBin } = require('yargs/helpers'); + const parsedArgs = yargs(hideBin(process.argv)).parse(); const parsedEnvArg = () => {