fix: resolve ESLint/Stylelint warnings and stale docs#158
Merged
Conversation
Root tsconfig had no exclude, so type-aware ESLint swept up every package's compiled lib/*.d.ts alongside its src/*.ts (30% of the program's files), inflating peak memory ~18% for no benefit. Follows the pattern already used in the kamado sibling repo. Also fixes documentation drift found while investigating: stale tool/subcommand/route counts and dead file references in ARCHITECTURE.md, and a compatibility-policy note in CONTRIBUTING.md that contradicted actual 0.x release practice.
eslint-plugin-jsdoc's no-undefined-types rule cannot verify {@link}
targets that point across files without an import, or at private
class members, so it flagged ~40 cross-references throughout the
package. Fixed each by qualifying same-file references as
ClassName.member, converting cross-file/cross-package references to
`import('./file.js').symbol` or backtick text, and adding
eslint-disable-next-line for the one intentional operator-facing
console.warn.
Also fixes two real doc bugs found in the process: page.ts referenced
methods renamed to getJsonLd/getTags, and crawler.ts had an orphaned
JSDoc block left behind when _launchBrowserAndScrape moved.
Same root cause as the crawler fix: {@link} targets that eslint-jsdoc
can't verify (cross-file symbols, or an inline `import('...').Type`
where a top-level import type already exists). Also flags two
intentional console.warn calls (malformed responseHeaders/meta_extras
JSON) as such.
- Resolve unreachable JSDoc {@link} references (same pattern as
crawler/query)
- Convert vi.importActual<typeof import(...)> to a top-level
import type * as NS plus typeof NS, in the three cache spec files
- pages-view.tsx: hoist the dynamic filter[key] access into a locally
built object so react-hooks/exhaustive-deps can see the full
dependency set instead of demanding the whole filter object
- styles.css: replace hardcoded #fff with var(--text-on-accent), a 6ch
width with 3.5em, and `display: block` with the two-keyword
`block flow` syntax
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.
Summary
jsdoc/no-undefined-types,no-console,@typescript-eslint/consistent-type-imports,react-hooks/exhaustive-deps) and 4 Stylelint warnings across crawler/query/report-google-sheets/viewer, by fixing the actual root cause of each rather than suppressing (see per-commit messages for the mechanism behind thejsdoc/no-undefined-typesfixes).page.tsreferenced JSDoc methods that had been renamed togetJsonLd/getTags, andcrawler.tshad an orphaned JSDoc block left behind by a prior refactor.exclude: ["node_modules", "**/*.d.ts"]to the roottsconfig.json— it had none, so type-aware ESLint was also parsing every package's compiledlib/*.d.tsoutput alongside its source (~30% of the program's files), inflating peak memory ~18% for no benefit.ARCHITECTURE.md(MCP tool count, CLI subcommand count, viewer route count, a nonexistentcrawler/utils/url/directory reference, two deleted benchmark scripts) and aCONTRIBUTING.mdcompatibility-policy note that contradicted actual 0.x release practice.react-hooks/incompatible-librarywarnings (TanStack Table + React Compiler) are left as-is — verified benign, no local fix exists short of an upstream TanStack Table change.Test plan
yarn lint:check— exit 0 (only the two accepted TanStack Table warnings remain)yarn build(via directtsc --buildper package +vite buildfor viewer, verified to defeat the sandbox's knownlerna run buildno-op) — all 14 packages + viewer frontend build cleanyarn vitest run— 254/254 test files, 2151/2156 tests passed (5 pre-existing skips)🤖 Generated with Claude Code