Skip to content

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

Open
rusackas wants to merge 1 commit into
masterfrom
chore/oxlint-1.66-newline-and-nested-components
Open

chore(oxlint): enable import/newline-after-import + react/no-unstable-nested-components#40319
rusackas wants to merge 1 commit into
masterfrom
chore/oxlint-1.66-newline-and-nested-components

Conversation

@rusackas
Copy link
Copy Markdown
Member

SUMMARY

oxlint 1.66 (bumped via #40318) added support for two ESLint rules that were previously listed in oxlint.json as not-implemented. This PR enables them.

Rules enabled:

Rule Level Violations Action
import/newline-after-import error 3 Auto-fixed via npx oxlint --fix
react/no-unstable-nested-components warn 150 Surfaced as warnings with a TODO to graduate to error after a cleanup pass

The 3 newline-after-import errors were all simple missing blank lines after imports and were fully auto-fixable. They are now at 0 errors in the config.

The 150 no-unstable-nested-components violations require real refactoring (hoisting component definitions out of parent render functions) and are too risky to fix in a single PR. They are set to "warn" with an inline TODO comment so we can graduate them to "error" after a dedicated cleanup pass.

Note on no-implied-eval: the user also asked about this rule — it was already enabled as "error" (superset-frontend/oxlint.json:91), so no change is needed there.

Also updated the "Rules carried over from ESLint that oxlint does NOT implement" comment block (around lines 36-61) to remove these two rules from the not-implemented list.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A — lint config change.

TESTING INSTRUCTIONS

cd superset-frontend
npx oxlint --config oxlint.json 2>&1 | grep -c "import(newline-after-import)"        # -> 0
npx oxlint --config oxlint.json 2>&1 | grep -c "react(no-unstable-nested-components)" # -> 150 (all warnings, non-blocking)

The newly introduced lint baseline contributes 0 new errors to the build. Pre-existing errors on master (32x require-to-throw-message) are untouched.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

…-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>
@bito-code-review
Copy link
Copy Markdown
Contributor

bito-code-review Bot commented May 21, 2026

Code Review Agent Run #72ce42

Actionable Suggestions - 0
Review Details
  • Files reviewed - 3 · Commit Range: 6eec5f1..6eec5f1
    • superset-frontend/packages/superset-ui-core/src/chart/components/SuperChart.tsx
    • superset-frontend/src/dashboard/actions/dashboardLayout.ts
    • superset-frontend/webpack.proxy-config.js
  • Files skipped - 1
    • superset-frontend/oxlint.json - Reason: Filter setting
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • Eslint (Linter) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.43%. Comparing base (a183582) to head (6eec5f1).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #40319   +/-   ##
=======================================
  Coverage   63.43%   63.43%           
=======================================
  Files        2591     2591           
  Lines      138471   138471           
  Branches    32120    32120           
=======================================
  Hits        87834    87834           
  Misses      49099    49099           
  Partials     1538     1538           
Flag Coverage Δ
javascript 67.15% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@aminghadersohi aminghadersohi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at HEAD 6eec5f192b36f984ebfad42bb63197daef2b9f01. No issues found across all applicable scans.

The graduated enforcement strategy is exactly right: import/newline-after-import had 3 auto-fixable violations → "error"; react/no-unstable-nested-components has ~150 violations requiring real refactoring → "warn" with a clear TODO to graduate after a cleanup pass. Avoids both leaving a newly-supported rule dormant and landing an oversized cleanup in a single PR.

The TODO comment at oxlint.json:187–190 is precise and actionable. Comment block cleanup is accurate. PR description is exemplary — quantified violations, documented the no-implied-eval non-change, and provided copy-paste verification commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants