Skip to content

Conversation

@overbalance
Copy link
Contributor

@overbalance overbalance commented Dec 14, 2025

What problem is this solving?

Adds build validation to catch:

  • Non-ES2022 JavaScript APIs (e.g., Set.prototype.intersection())
  • Non-baseline Web APIs (e.g., Temporal)
  • Package integrity issues (sourcemaps, exports)
  • Bundle size regressions
  • Accidental CommonJS in ESM output

Changes

scripts/validate.js

Runs 5 validation checks on built packages:

Check Tool What it catches
ES2022 API compliance tsc with lib: ES2022 ES2024+ APIs like Set.intersection()
Web API baseline eslint-plugin-baseline-js Non-baseline DOM/browser APIs like Temporal
Package exports publint + sourcemap validation Broken exports, missing sourcemaps
Bundle size gzip check Fails if any package exceeds 6KB gzipped
Module integrity grep for require() CommonJS leaking into ESM output

eslint.dist.config.js

ESLint config for checking compiled output with baseline-js/use-baseline rule.

Other

  • check-types depends on build in turbo (needed for cross-package type declarations)
  • @opentelemetry/test-utils added as devDependency for instrumentation-user-action
  • CI runs npm run validate after build

Testing

npm run build
npm run validate  # ~1.4s

@overbalance overbalance force-pushed the overbalance/lint-research branch from 9d17e49 to 95b7317 Compare December 30, 2025 18:53
@overbalance overbalance marked this pull request as ready for review December 30, 2025 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant