Repository navigation
Fix npm run lint and run it in CI - #41
Merged
Merged
Conversation
`npm run lint` fails on every checkout: it calls `next lint`, which Next 16 removed, and the repo has no ESLint flat config, so running `eslint` directly fails too. Lint has silently not run, and 11 errors built up. Replace the script with `eslint .` and add an `eslint.config.mjs` using eslint-config-next's core-web-vitals and TypeScript presets, then fix the errors: - Use next/link for internal links in Nav and Footer. The RSS link stays a plain anchor because /feed.xml is XML, not a page. - Nav: the homepage now passes a `hero` prop instead of Nav discovering the hero and setting state synchronously in an effect. Pages without a hero render the logo from the first paint instead of after hydration. - PostList: reset the visible count during render when the posts prop changes, rather than in an effect. Add a lint step to the CI workflow so this does not regress, and update CONTRIBUTING.md to say CI runs all three checks. The 18 remaining warnings, mostly <img> over next/image, match how the site is built and are left as is. Signed-off-by: Bassam Tabbara <bassam@upbound.io>
charliehinojosa
added a commit
to charliehinojosa/website
that referenced
this pull request
Oct 20, 2026
Follow-up to the merged Inference Day page (modelplaneai#40), rebased onto the lint fix (modelplaneai#41): - Make the hero and closing-CTA contrail full-bleed, sized in vw so the wave spans the section at every width (the fan reaches the lower-left, the lines run off the top-right) instead of being cut off; soften it on phones for legibility. - Add a dismissible homepage announcement bar linking to /inference-day. It is rendered client-only (its visibility depends on localStorage and the date), so there is no effect-driven state and no hydration mismatch; it hides itself once the event has passed. - Add an Inference Day link to the main nav (next to Slack, cyan accent) using next/link, and give the landing page a two-tier header: the main site Nav plus a slim event sub-nav for the on-page jump links. This replaces the standalone EventNav. npm run lint, build and validate-posts all pass. Signed-off-by: Charlie Hinojosa <charlie@sightbox.me>
2 tasks done
This branch was successfully deployed
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.
What and why
npm run lintfails on every checkout. It callsnext lint, which Next 16 removed (Invalid project directory provided, no such directory: .../lint), and the repo has no ESLint flat config, so runningeslintdirectly fails too. Lint has silently not run, and 11 errors built up. #40 had to skip this checklist item because of it.This PR:
"lint": "eslint .", plus aneslint.config.mjsusingeslint-config-next's core-web-vitals and TypeScript presets (the packages were already indevDependencies).no-html-link-for-pages(9): internal links inNavandFooternow usenext/link. The RSS link inBlogSidebarstays a plain<a>with a scoped disable, because/feed.xmlis XML, not a pageLinkcan navigate to.set-state-in-effectinNav: the homepage now passes<Nav hero />instead of Nav finding the hero and setting state synchronously in an effect. Behavior is the same on the homepage; other pages now render the logo from the first paint instead of flashing the hidden state before hydration (checked in the server-rendered HTML:/getsnav--top,/blogand/manifestodon't).set-state-in-effectinPostList: the visible count resets during render when thepostsprop changes (React's "adjusting state when a prop changes" pattern), instead of in an effect.eslint.config.mjsto its path filter), and updatesCONTRIBUTING.mdto say CI runs all three checks.The 18 remaining warnings are mostly
@next/next/no-img-element. Using plain<img>matches how the rest of the site is built, so they're left as is. Warnings don't fail lint.Checklist
npm run lintandnpm run buildlocally. Lint: 0 errors, 18 warnings; build passes;tsc --noEmitis clean too.RanNo blog content changed (ran it anyway; all 8 posts validate).npm run validate-postsif I changed blog content.git commit -s.