chore(oxlint): enable import/newline-after-import + react/no-unstable-nested-components

oxlint 1.66 (bumped in #40318) added support for two ESLint rules that
were previously listed as not-implemented:

  - import/newline-after-import  -> enabled as "error" (3 violations,
    auto-fixed via `--fix`)
  - react/no-unstable-nested-components -> enabled as "warn" with a
    TODO to graduate to "error" after a cleanup pass (~150 violations
    that require hoisting nested component definitions out of their
    parent render functions)

Also dropped these two rules from the "not implemented in oxlint"
comment block since they are implemented now.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-05-20 22:48:05 -07:00
parent a183582291
commit 6eec5f192b
4 changed files with 13 additions and 3 deletions

View File

@@ -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"
}

View File

@@ -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 & {

View File

@@ -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 -------------------------------------------------------------

View File

@@ -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 = () => {