Refactor: 社團活動、競賽得獎獨立為json檔。Chore: ESLint設定檔修正、Actions升級。 - #174
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the site’s “社團活動” and “競賽得獎” content to be sourced from JSON under src/data/ (queried via Gatsby GraphQL) and includes maintenance updates such as ESLint flat-config migration, CI workflow updates, and dependency bumps.
Changes:
- Move club activities and contest award lists into JSON files under
src/data/activities/andsrc/data/contest/, and update pages to queryallActivitiesJson/allContestJson. - Centralize external navigation links via
src/constants/navigation.jsand reuse it fromindex.js/navbar.js. - Migrate ESLint to
eslint.config.mjs, update GitHub Actions Node setup, and refresh dependencies/lockfile.
Reviewed changes
Copilot reviewed 31 out of 32 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Dependency/lockfile updates (ESLint/Tailwind/PostCSS/etc). |
| src/templates/member_page.js | Switch statement cleanup for icon rendering. |
| src/templates/gallery.js | Add React key to mapped anchor elements. |
| src/pages/index.js | Use EXTERNAL_LINKS.joinUs and add rel for external links. |
| src/pages/course.js | Replace non-link <a> elements with <span> for semantics. |
| src/pages/contest.js | Load contest data from allContestJson via GraphQL and render dynamically. |
| src/pages/companion.js | Replace custom button markup with shared SliderButton. |
| src/pages/club_activities.js | Load activities from allActivitiesJson via GraphQL; minor URL change. |
| src/data/contest/2026.json | Add 2026 contest awards dataset. |
| src/data/contest/2025.json | Add 2025 contest awards dataset. |
| src/data/contest/2024.json | Add 2024 contest awards dataset. |
| src/data/contest/2023.json | Add 2023 contest awards dataset. |
| src/data/contest/2022.json | Add 2022 contest awards dataset. |
| src/data/contest/2021.json | Add 2021 contest awards dataset. |
| src/data/contest/2020.json | Add 2020 contest awards dataset. |
| src/data/contest/2019.json | Add 2019 contest awards dataset. |
| src/data/contest/2018.json | Add 2018 contest awards dataset. |
| src/data/contest/2017.json | Add 2017 contest awards dataset. |
| src/data/activities/114.json | Add activities for academic year 114. |
| src/data/activities/113.json | Add activities for academic year 113. |
| src/data/activities/112.json | Add activities for academic year 112. |
| src/data/activities/111.json | Add activities for academic year 111. |
| src/constants/navigation.js | Introduce EXTERNAL_LINKS constant for external URLs. |
| src/components/navbar.js | Use EXTERNAL_LINKS.joinUs for Join Us button. |
| src/components/image-with-placeholder.js | Fix React attribute casing (fetchPriority). |
| README.md | Document how to add activities/contest JSON data. |
| package.json | Add Node/Yarn engines, add/update lint/build tool dependencies. |
| eslint.config.mjs | Add ESLint flat config (replacing legacy .eslintrc.js). |
| AGENTS.md | Update repo structure docs for new activities/ and contest/ data dirs. |
| .github/workflows/prettier_check.yml | Update checkout/setup-node actions and Node version usage. |
| .github/workflows/build.yml | Update checkout/setup-node actions and Node version usage. |
| .eslintrc.js | Remove legacy ESLint config file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 31 out of 32 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
.github/workflows/prettier_check.yml:21
- This job runs
npx prettierwithout installing project dependencies, so CI will use whatever Prettier versionnpxresolves at runtime (which may differ from the repo’s pinned Prettier) and can cause formatting drift over time. Consider installing deps (e.g.,yarn --frozen-lockfile) and running the project’s Prettier, or pinning the Prettier version explicitly in thenpxcommand.
- name: Checkout Code
uses: actions/checkout@v6
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: "22"
- name: Prettier Check
run: npx prettier --check .
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.