Skip to content

Refactor ESLint configuration and improve React key handling - #559

Merged
jliermann merged 30 commits into
mainfrom
chore/eslint-react
Oct 29, 2026
Merged

jliermann merged 30 commits into
mainfrom
chore/eslint-react

Conversation

@jliermann

@jliermann jliermann commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor
  • Replaces the legacy React ESLint plugins with @eslint-react and upgrades ESLint.
  • Updates list keys, state initialization, fetch cleanup, and component props; removes unused components.
  • Adds npm installation restrictions, including a 14-day dependency cooldown.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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-react and 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

Comment thread src/components/lbe/Lbe.js Resolved
Comment thread .npmrc Resolved
Comment thread src/components/features/Features.js Resolved
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>
@jliermann
jliermann merged commit d376645 into main Oct 29, 2026
5 checks passed
@jliermann
jliermann deleted the chore/eslint-react branch October 29, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants