Add ESLint rule to catch broken internal links and standardize on npm
@allgandalf y travaille déjà.
Depuis le 26/2/2026.
Évaluation
Cette issue n'a pas encore été évaluée.
Description
Problem
Internal links in JSX pages are prone to formatting bugs that break navigation. For example, PR #155 fixed links in gsoc.js where relative paths like href="gsoc_ideas" and href="gsoc_ideas.html" were used instead of the correct absolute path href="/gsoc_ideas/".
The same class of issues still exists in other files (e.g. news.js has href="gsoc.html" and URLs with leading whitespace like href=" https://...").
Currently nothing catches these at development time because:
- The project has no linting setup
onBrokenLinksis set to"ignore"indocusaurus.config.js
Additionally, the project has both a yarn.lock and package-lock.json even though CI exclusively uses npm, which causes confusion.
Proposed Solution
-
Add ESLint with a custom
no-bad-internal-linksrule that flagshrefandtoattributes in JSX where:- Whitespace in URLs: leading/trailing spaces (e.g.
href=" https://...") - Relative internal links: missing leading
/(e.g.href="gsoc.html"should behref="/gsoc/") .htmlextensions: Docusaurus uses clean URLs, so.htmlshould not be used- Missing trailing slash: internal links should end with
/
- Whitespace in URLs: leading/trailing spaces (e.g.
-
Add a GitHub Actions workflow so the lint check runs on every PR and push to master.
-
Fix all existing lint violations across the codebase.
-
Remove
yarn.lockand standardize on npm, consistent with all CI workflows.
- Langage dominant
- CSS
- Étoiles
- 7
- Forks
- 25
- Merge moyen
- 3 j 13 h
- PR mergées (30 j)
- 2
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de PecanProject/PecanProject.github.io
-
Reloading /package-documentation/ shows pkgdown README instead of version chooserPeut-être pris @ANAMASGARD l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
PecanProject/PecanProject.github.io#206 · 1 commentaire ·
-
Add lychee GitHub action to automatically check for broken linksPeut-être pris @Avneetsingh18-doit l’a pris il y a 261 jours. Ouvertegood first issue
PecanProject/PecanProject.github.io#134 · 8 commentaires · 1 réaction · 1 personne assignée ·
-
Enhance Site Navigation: Add Search Bar to NavbarPeut-être pris @divine7022 l’a pris il y a 653 jours. Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 25/100
PecanProject/PecanProject.github.io#90 · 23 commentaires ·