diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 8cdfc1e..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,12 +0,0 @@ -module.exports = { - globals: { - __PATH_PREFIX__: true - }, - extends: `react-app`, - rules: { - "no-unused-vars": [ - "error", - { vars: "all", args: "after-used", ignoreRestSiblings: false } - ] - } -}; diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..e6b5e47 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,14 @@ +## Summary + + + +## Test plan + +- [ ] `npm run lint` passes +- [ ] `npm run develop` boots and the affected pages render +- [ ] If user-facing strings changed, both `en.json` and `es.json` are updated + +## Checklist + +- [ ] Followed [CONTRIBUTING.md](../CONTRIBUTING.md) +- [ ] Acknowledged the [Code of Conduct](../CODE_OF_CONDUCT.md) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e4e781..efadef3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,23 +1,35 @@ name: CI -on: [push, pull_request] + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: read + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + jobs: build: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: .nvmrc + cache: npm - name: Install run: npm ci - name: Lint run: npm run lint - name: Build run: npm run build - - name: Percy Test - run: npx percy snapshot _site/ - with: - build-directory: "public/" + - name: Percy Snapshot + run: npx --yes @percy/cli snapshot public/ env: PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index 6eae2a3..14a7504 100644 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -1,13 +1,20 @@ name: Greetings -on: [pull_request, issues] +on: + pull_request_target: + issues: + types: [opened] + +permissions: + issues: write + pull-requests: write jobs: greeting: runs-on: ubuntu-latest steps: - - uses: actions/first-interaction@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - issue-message: 'Gracias por tu interes en Fullstack Nights y por hacer este GitHub Issue! Pronto estaremos en contacto.' - pr-message: 'Gracias por tu interes en Fullstack Nights y por hacer este Pull Request! Pronto estaremos en contacto.' + - uses: actions/first-interaction@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: "Gracias por tu interes en Fullstack Nights y por hacer este GitHub Issue! Pronto estaremos en contacto." + pr-message: "Gracias por tu interes en Fullstack Nights y por hacer este Pull Request! Pronto estaremos en contacto." diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index d4b4cb5..5527f8a 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -2,19 +2,22 @@ name: Mark stale issues and pull requests on: schedule: - - cron: "0 0 * * sun" + - cron: "0 0 * * sun" + workflow_dispatch: + +permissions: + issues: write + pull-requests: write jobs: stale: - runs-on: ubuntu-latest - steps: - - uses: actions/stale@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: 'This issue has been marked as stale by our fancy bot. CC: @eluciano11 @froi' - stale-pr-message: 'This pull request has been marked as stale by our fancy bot. CC: @eluciano11 @froi' - stale-issue-label: 'no-issue-activity' - stale-pr-label: 'no-pr-activity' - days-before-close: -1 + - uses: actions/stale@v9 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: "This issue has been marked as stale by our fancy bot. CC: @eluciano11 @rnegron" + stale-pr-message: "This pull request has been marked as stale by our fancy bot. CC: @eluciano11 @rnegron" + stale-issue-label: "no-issue-activity" + stale-pr-label: "no-pr-activity" + days-before-close: -1 diff --git a/.nvmrc b/.nvmrc index 72e4a48..db49bb1 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18.14.2 +22.22.2 diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 4cc587f..d7df89c 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,6 +1,3 @@ { - "recommendations": [ - "esbenp.prettier-vscode", - "dbaeumer.vscode-eslint" - ] -} \ No newline at end of file + "recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"] +} diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..c20ee82 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,68 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Commands + +Node version is pinned via `.nvmrc` (currently `22.22.2`, lts/jod). Use `nvm use` before running anything. + +- `npm run develop` — start the Gatsby dev server (`gatsby develop`); also aliased as `npm start` +- `npm run build` — production build into `public/` +- `npm run serve` — serve the production build +- `npm run clean` — `gatsby clean` (run this when you hit Gatsby cache weirdness) +- `npm run lint` — `oxlint src/` (zero-config; replaced ESLint) +- `npm run format` — Prettier 3 over `**/*.{js,jsx,json,md}` + +There is no unit test runner — the `test` script is a placeholder. CI (`.github/workflows/ci.yml`) runs `lint`, `build`, and a Percy visual snapshot step against `public/` (requires `PERCY_TOKEN`). + +## Architecture + +Static marketing site for Fullstack Nights (a Puerto Rico tech/design community), built with **Gatsby 5 + React 18 + Tailwind 3 + PostCSS**. + +### Active event toggle (`src/config.js`) + +`CONFIG.activeEvent` is the single switch that drives event-related UI across the site: + +- When `false`: the `/schedule/` route is filtered out of the nav (`getSections` in `src/constants.js`) and the homepage hides ``. +- When `true`: set `CONFIG.event` to `{ type, date, venue, participants }`. `type` is `"topic-tables"` or anything else (treated as Speakers). The homepage layout shifts (different spacing classes are applied). + +When adding a new event, edit only `src/config.js` — no other files should hardcode event data. + +### Internationalization (`src/i18n.js`, `src/locales/{en,es}.json`) + +i18next is initialized in `gatsby-browser.js`. Languages are detected via `i18next-browser-languagedetector` with fallback `en`. The language switcher in `getLanguageSwitcher` toggles between `en-US` and `es-PR` specifically. All user-facing strings should go through `useTranslation()` and live in both `en.json` and `es.json` — keep the two files structurally in sync. + +### Components (`src/components/`) + +- Barrel re-export from `src/components/index.js` — import shared components from `"../components/index"`. +- Each component pairs `foo.js` with an optional `foo.module.css` (CSS Modules). Tailwind utility classes are used inline; `.module.css` is reserved for things Tailwind can't express. +- `Layout` wraps every page with `` + `
` + `