chore(protocol-core): declare lint dependencies and typecheck scripts/ - #31
Merged
Merged
Conversation
The shared ESLint flat config lives at the repo root and imports `@eslint/js` and `typescript-eslint`, which Node resolves relative to the config file. Declare those in the root manifest, together with the `typescript` peer that `typescript-eslint` requires, and declare `eslint` in protocol-core so its lint script resolves its own binary. `pnpm -r lint` runs across the workspace. Extend the package tsconfig to cover `scripts/` so the address validation script is type-checked and reachable by the type-aware lint rules, and declare `@types/node` so its Node globals come from a stated dependency rather than one inherited through the dev dependency graph. Add a `typecheck` script, a root `typecheck` that recurses like `lint`, and a CI step so it runs alongside the other checks. Point tsup at the existing `tsconfig.build.json` so the build keeps its own input list instead of following the tsconfig that the typecheck widens. The bundle is defined by `entry`, so this changes no output: `dist/` is byte-for-byte identical. Move eslint to the newest 9.x.
henrypalacios
force-pushed
the
chore/protocol-core-lint-config
branch
from
August 28, 2026 01:58
c0188b6 to
6772f3f
Compare
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
pnpm -r lintruns across the workspace.packages/protocol-core/scripts/under both lint and typecheck.typecheckscript, a roottypecheckthat recurses likelint, and a CI step so it runs alongside Lint and Build.Changes
package.json@eslint/js,typescript-eslint, andtypescript. The flat config at the repo root imports the first two, and Node resolves a config file's imports relative to that file, so they belong in the root manifest;typescriptis a non-optional peer oftypescript-eslint. Add the recursivetypecheckscript.packages/protocol-core/package.jsoneslintso the package'slintscript resolves its own binary, and@types/nodeso the validation script's Node globals come from a stated dependency. Widenlinttosrc/ scripts/; addtypecheck(tsc --noEmit -p tsconfig.json).packages/protocol-core/tsconfig.jsonincludenow coversscriptsalongsidesrc, so the address validation script is type-checked and reachable by the type-aware lint rules.packages/protocol-core/tsup.config.tstsconfig.build.json, so it keeps its own input list rather than following the tsconfig the typecheck widens..github/workflows/CI.ymlTypecheckstep betweenLintandBuild.pnpm-lock.yamlBuild output
dist/is unchanged — same six files, same byte sizes, identical SHA-256:The tsup
tsconfigpin is deliberately a no-op for output: the bundle is defined byentry: ['src/index.ts'], and a build with the pin removed produces the same six checksums.npm pack --dry-runstill lists onlyREADME.md,package.json, and the sixdist/files.Test plan
Run from
packages/protocol-coreunless noted.pnpm lint— exit 0pnpm typecheck— exit 0;--listFilesconfirmsscripts/validate-addresses.tsis in the programpnpm test— 9 files, 154 tests passedpnpm build— exit 0;dist/checksums unchangedpnpm validate:addresses— 44 addresses validated across 11 chainspnpm -r lint— exit 0, both packagespnpm -r typecheck— exit 0;packages/sdkhas notypecheckscript and is skippedpnpm install --frozen-lockfile— exit 0Scope
Configuration and dependency declarations only. No
src/logic and no version change. The onlyCI.ymledit is the addedTypecheckstep.