Repository navigation
Refactor ESLint configuration and improve React key handling - #559
Merged
Merged
Conversation
…ult output logic in ElnFinder components
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Outstanding issues cause hydration mismatches on query-filtered dataset pages, duplicate React keys, and missing pre-commit hooks after fresh installs.
3 open issues
What changed in this PR
This PR modernizes React linting in the knowledge base and refactors components to address the new rules. It also introduces npm installation security settings.
Changes:
- Migrates to
@eslint-reactand updates ESLint configuration and dependencies. - Reworks list keys, state initialization, and fetch cleanup; removes obsolete components.
- Adds npm security settings, including a configured 14-day release cooldown.
| File | Description |
|---|---|
static/assets/lbe.json |
Removes a duplicate dataset link. |
src/theme/common/Details/index.tsx |
Separates the content class from forwarded props. |
src/pages/index.js |
Removes an unused React import. |
src/components/repos/RepoButton.js |
Removes an unused React import. |
src/components/lbe/ShortenButtons.js |
Deletes the legacy button-list component. |
src/components/lbe/LbeElements.js |
Refactors filter-label calculation. |
src/components/lbe/LbeBody.js |
Replaces index keys with data-derived keys. |
src/components/lbe/Lbe.js |
Moves URL-derived state into a lazy initializer. |
src/components/lbe/FilterSection.js |
Uses filter values as keys. |
src/components/lbe/Authors.js |
Standardizes the state-setter name. |
src/components/features/Features.js |
Changes feature-button keys. |
src/components/eln/ElnStack.js |
Uses notebook names as card keys. |
src/components/eln/ElnFinderPharm.js |
Adds fetch cancellation and refactors result messages. |
src/components/eln/ElnFinder.js |
Adds fetch cancellation and refactors result messages. |
src/components/eln/elnFilter/ElnFilter.js |
Uses filter labels as keys. |
src/components/eln/ElnCard.js |
Uses subdiscipline values as keys. |
src/components/deprecated/Methods.js |
Removes the deprecated methods component. |
src/components/deprecated/KbTagCloud.js |
Removes the deprecated tag-cloud component. |
src/components/chemotion/ChemotionCarousel.js |
Uses page values and image sources as keys. |
package.json |
Updates linting dependencies and related version ranges. |
eslint.config.js |
Migrates to ES modules and recommended @eslint-react rules. |
.npmrc |
Adds lifecycle-script, Git-source, and release-age restrictions. |
Review effort: Balanced
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: jliermann <40795855+jliermann@users.noreply.github.com>
Co-authored-by: jliermann <40795855+jliermann@users.noreply.github.com>
Co-authored-by: jliermann <40795855+jliermann@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Uh oh!
There was an error while loading. Please reload this page.