Skip to content

Expand oxlint config for better eslint parity#2972

Open
bradenmacdonald wants to merge 4 commits intoopenedx:masterfrom
open-craft:braden/expand-oxlint
Open

Expand oxlint config for better eslint parity#2972
bradenmacdonald wants to merge 4 commits intoopenedx:masterfrom
open-craft:braden/expand-oxlint

Conversation

@bradenmacdonald
Copy link
Copy Markdown
Contributor

Description

Relates to: #2559

We have deliberately not been running eslint for a while now. I wanted to see if any issues have gotten into the code that eslint would have caught, but oxlint is not catching.

There were some issues: a react hook violation, some unused imports, and some formatting issues.

It turns out that I just needed to tweak the oxlint configuration and it was now able to catch those issues too, as well as more issues. We didn't have the react plugin enabled, so I enabled it now, and it caught a lot of missing key errors.

Remaining issues

There are a few remaining issues that eslint is flagging that oxlint does not pick up:

frontend-app-authoring/src/library-authoring/library-info/LibraryInfo.test.tsx
  294:73  error  Trailing spaces not allowed  no-trailing-spaces

frontend-app-authoring/src/taxonomy/data/apiHooks.ts
  19:1  error  `@edx/frontend-platform/i18n` import should occur before import of `./api`  import/order

frontend-app-authoring/src/taxonomy/tag-list/tagColumns.tsx
  123:2  error  Missing semicolon  @typescript-eslint/semi

The reason is that oxlint considers these to be formatting issues, not lint issues, and they would be detected/fixed by oxfmt. Using oxfmt is worth a separate PR/discussion.


Private ref MNG-4763

@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Apr 1, 2026
@openedx-webhooks
Copy link
Copy Markdown

Thanks for the pull request, @bradenmacdonald!

This repository is currently maintained by @bradenmacdonald.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

url,
}) => (
<CardItem
key={courseKey}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was resulting in a React console warning, and eslint was not picking it up but oxlint now catches it.

installHook.js:1 Warning: Each child in a list should have a unique "key" prop.
Check the render method of `CardList`. See https://reactjs.org/link/warning-keys for more information.

{blockTypes.map((blockTypeObj) => (
<BlockCardButton
{...blockTypeObj}
key={blockTypeObj.blockType}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was resulting in a React console warning, and eslint was not picking it up but oxlint now catches it.

installHook.js:1 Warning: Each child in a list should have a unique "key" prop.
Check the render method of `AddNewContent`. See https://reactjs.org/link/warning-keys for more information.
    at BlockCardButton (webpack-internal:///./src/generic/sidebar/BlockCardButton.tsx:26:3)
    at AddNewContent (webpack-internal:///./src/course-unit/unit-sidebar/AddSidebar.tsx:90:88)

/>
) : (
<CourseUpdate
key={courseUpdate.id}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was resulting in a React console warning, and eslint was not picking it up but oxlint now catches it.

Warning: Each child in a list should have a unique "key" prop.
Check the render method of `CourseUpdates`. See https://reactjs.org/link/warning-keys for more information.
    at CourseUpdate (webpack-internal:///./src/course-updates/course-update/CourseUpdate.jsx:32:3)
    at CourseUpdates (webpack-internal:///./src/course-updates/CourseUpdates.tsx:69:87)

@bradenmacdonald bradenmacdonald requested a review from ChrisChV April 1, 2026 00:29
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

❌ Patch coverage is 95.23810% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.56%. Comparing base (ec4cd64) to head (bff903d).

Files with missing lines Patch % Lines
...l/components/TranscriptWidget/LanguageSelector.jsx 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2972      +/-   ##
==========================================
- Coverage   95.56%   95.56%   -0.01%     
==========================================
  Files        1349     1349              
  Lines       31155    31171      +16     
  Branches     7064     7065       +1     
==========================================
+ Hits        29773    29788      +15     
- Misses       1320     1321       +1     
  Partials       62       62              

☔ 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.

@bradenmacdonald bradenmacdonald changed the title Braden/expand oxlint Expand oxlint config for better eslint parity Apr 1, 2026
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Ready for Review in Contributions Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U

Projects

Status: Ready for Review

Development

Successfully merging this pull request may close these issues.

3 participants