Skip to content

ci(pages): add ESLint and bundle size check to CI pipeline - #558

Merged
lizhengfeng101 merged 1 commit into
mainfrom
ci/pages-lint-and-size-check
Jul 28, 2026
Merged

ci(pages): add ESLint and bundle size check to CI pipeline#558
lizhengfeng101 merged 1 commit into
mainfrom
ci/pages-lint-and-size-check

Conversation

@lizhengfeng101

Copy link
Copy Markdown
Collaborator

Summary

  • Add ESLint (v10, flat config) with typescript-eslint recommended rules and eslint-plugin-react-hooks to catch code quality issues in pages/src/
  • Add size-limit with @size-limit/file to monitor initial bundle size (threshold: 150 kB brotli, current: ~80 kB)
  • Rename webpack.config.js, postcss.config.js, tailwind.config.js.cjs to support "type": "module" in package.json (required for ESLint flat config ESM imports)
  • Fix 4 no-useless-escape warnings and 1 no-useless-assignment error in existing source files
  • Update pages-ci.yml to run lint before typecheck and size check after build

CI Pipeline (updated)

Install → Lint → Typecheck → Build → Check bundle size

Test plan

  • npm run lint passes (0 errors, 2 warnings)
  • npm run typecheck passes
  • npm run build succeeds
  • npm run size passes (80 kB < 150 kB limit)

- Add ESLint with typescript-eslint and react-hooks plugin
- Add size-limit to monitor initial bundle size (150 kB threshold)
- Rename .js configs to .cjs for ESM compatibility ("type": "module")
- Fix no-useless-escape and no-useless-assignment lint errors
- Update pages-ci.yml with lint and size check steps
@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

🔍 OpenCodeReview found 3 issue(s) in this PR.

  • ✅ Successfully posted inline: 3 comment(s)

Comment thread pages/eslint.config.js
Comment thread pages/src/content/blog/index.ts
Comment thread pages/src/content/docs/index.ts

@xyJen xyJen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lizhengfeng101
lizhengfeng101 merged commit 8022d4a into main Jul 28, 2026
14 checks passed
@lizhengfeng101
lizhengfeng101 deleted the ci/pages-lint-and-size-check branch July 28, 2026 12:19
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.

2 participants