Make npm run lint work in the remaining five recipes - #250
Open
Hotragn wants to merge 1 commit into
Open
Conversation
Completes the set from tinyfish-io#248, following the shape of tinyfish-io#249. Before this, none of these five could lint at all: restaurant-comparison-tool eslint . + .eslintrc.json exit 2 tutor-finder next lint, no config exit 1 scholarship-finder next lint, no config exit 1 summer-school-finder next lint, no config exit 1 tenders-finder next lint on Next 16 exit 1 Two config styles, because they are not interchangeable. The four on Next 15 use FlatCompat from @eslint/eslintrc: eslint-config-next@15 ships core-web-vitals.js and typescript.js as legacy eslintrc objects with no exports subpaths, so the flat subpath imports the Next 16 recipes use cannot resolve there. tenders-finder is on Next 16 and gets the subpath style, matching the ten recipes that already have a config. restaurant-comparison-tool keeps extending core-web-vitals only, as its .eslintrc.json did, rather than being quietly made stricter. The four with no previous config get core-web-vitals + typescript, matching the Next 16 recipes. Scripts move from "next lint" to "eslint", the idiom in nine of the ten already-working recipes. Turning lint on surfaced 12 errors, all fixed so lint lands green: - tenders-finder: two react-hooks/set-state-in-effect violations. Both were an effect resetting an iframe loading flag when the URL changed; both now derive that flag from which URL actually loaded, removing the effect rather than suppressing the rule. - ternary-as-statement in four recipes, unused vars and imports, and a dead isExpanded prop in scholarship-finder passed but never read. - require("tailwindcss-animate") replaced with an import in four tailwind configs. Verified each config still loads through jiti, the loader Tailwind v3 uses, with the animate plugin intact. npm run lint and tsc --noEmit exit 0 in all five. Two warnings remain untouched: an exhaustive-deps warning in summer-school-finder, since adding the dependency risks changing render behaviour, and nothing in tenders-finder. Note tutor-finder's npm ci already fails on main - its lock predates four declared @radix-ui dependencies. Left alone here so this stays a lint change; filed separately.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Aug 18, 2026
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.
Completes #248. Same shape as #249, which has the detailed rationale.
Before
None of these five could lint at all. Measured by installing each and running its own script:
restaurant-comparison-tooleslint .+.eslintrc.json.eslintrc.*tutor-findernext lint, no configscholarship-findernext lint, no configsummer-school-findernext lint, no configtenders-findernext linton Next 16next lintwas removed in Next 16Two config styles, because they aren't interchangeable
The four on Next 15 use
FlatCompat.eslint-config-next@15shipscore-web-vitals.jsandtypescript.jsas legacy eslintrc objects (module.exports = { extends: [...] }) and declares noexportssubpaths, so the flat subpath imports used by the Next 16 recipes cannot resolve there.tenders-finderis on Next 16, so it gets the subpath style — byte-identical to the ten recipes that already have a config.Deliberately not standardising strictness:
restaurant-comparison-toolkeeps extendingcore-web-vitalsonly, exactly as its.eslintrc.jsondid. Making it stricter would have been a separate decision smuggled into a repair. The four with no previous config getcore-web-vitals+typescript, matching the Next 16 recipes.Scripts move from
next linttoeslint, the idiom in 9 of the 10 already-working recipes.The 12 errors turning lint on surfaced
The interesting two are in
tenders-finder, which is on Next 16 and therefore gets the newerreact-hooksrules:Both violations (
LiveBrowserModal.tsx,AgentPreviewCard.tsx) were the same thing: an effect resetting an iframe loading flag when the URL changed. Deriving the flag from which URL actually loaded removes the effect entirely and a piece of state with it — which is the answer the rule is pointing at, rather than a suppression comment. A new URL brings the spinner back automatically with no synchronising code.The rest are mechanical: ternary-as-statement in four recipes, unused vars and imports, and a dead
isExpandedprop inscholarship-finderthat was passed but never read (removed from the prop, the type and the call site — all in one file).require("tailwindcss-animate")→importin four tailwind configs. There's no in-repo precedent for that ESM import, since the Next 16 recipes are on Tailwind v4 and don't use the plugin, so rather than assume CJS interop works I loaded each config throughjiti— the loader Tailwind v3 actually uses — and confirmed the animate plugin is present and valid in all four. That also retroactively validates the same change in #249.Verification
npm run lintandtsc --noEmitexit 0 in all five.Two warnings left untouched on purpose: an
exhaustive-depswarning insummer-school-finder/src/hooks/useSummerSchoolSearch.ts— addingrunAgentto the dependency array risks changing render behaviour, which isn't a call to make inside a lint repair. Nothing outstanding in the other four.The four
package-lock.jsondiffs are one line each —@eslint/eslintrcadded to rootdevDependencies, pinned to^3.3.5which the already-locked version satisfies, so no version churn.One pre-existing problem I did not fix
npm cialready fails intutor-finderonmain:Its lock predates four declared dependencies. Regenerating it is ~900 lines of unrelated churn that would bury this change, so I left it and used
npm installto verify that recipe. Filed separately — it deserves its own PR where a lock regeneration is the expected diff.Happy to split this per-recipe if you'd rather review five smaller PRs.