You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2026/05/22 17:11:48 UTC

(superset) branch master updated: chore(oxlint): enable import/newline-after-import + react/no-unstable-nested-components (#40319)

This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new c945ef67639 chore(oxlint): enable import/newline-after-import + react/no-unstable-nested-components (#40319)
c945ef67639 is described below

commit c945ef6763930b0becfd42cbcb33c1596d55111d
Author: Evan Rusackas <ev...@preset.io>
AuthorDate: Fri May 22 10:11:38 2026 -0700

    chore(oxlint): enable import/newline-after-import + react/no-unstable-nested-components (#40319)
    
    Co-authored-by: Claude <cl...@anthropic.com>
    Co-authored-by: Claude Sonnet 4.6 <no...@anthropic.com>
---
 superset-frontend/oxlint.json                               | 13 ++++++++++---
 .../superset-ui-core/src/chart/components/SuperChart.tsx    |  1 +
 superset-frontend/src/dashboard/actions/dashboardLayout.ts  |  1 +
 superset-frontend/webpack.proxy-config.js                   |  1 +
 4 files changed, 13 insertions(+), 3 deletions(-)

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<Dimension>;
 
 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<RootState, undefined, AnyAction>;
 
 // 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 = () => {