Skip to content

refactor: modernization project foundation#288

Open
yangxu52 wants to merge 6 commits into
xqq:masterfrom
yangxu52:refactor/modernization-foundation
Open

refactor: modernization project foundation#288
yangxu52 wants to merge 6 commits into
xqq:masterfrom
yangxu52:refactor/modernization-foundation

Conversation

@yangxu52
Copy link
Copy Markdown

@yangxu52 yangxu52 commented May 5, 2026

This PR establishes the first modernization baseline for the repository and development workflow.

It focuses on package management, formatting, static checks, CI, pre-commit automation, and clearer TypeScript
configuration boundaries.

There are no intentional public runtime API changes in this PR.

Included commits

  1. chore: adopt pnpm for repository development

    • switch development workflow from npm to pnpm
    • require Node.js >=18.12.0 and pnpm >=10 via engines
    • remove package-lock.json and keep pnpm-lock.yaml
    • update build and debug docs to use pnpm
    • fix webpack ts-loader exclude node_modules typo
  2. chore: add formatting baseline

    • ignore .local task artifacts and pnpm debug logs
    • add editorconfig and gitattributes for basic repo formatting rules
    • add prettier config and ignore rules
    • add prettier as a dev dependency
  3. chore: add lint and typecheck baseline

    • add ESLint 9 flat config
    • add lint, tsc, and check scripts
    • align tsconfig with noEmit checks
    • add @types to fix index.js TS9006 issue
  4. ci: add GitHub Actions check workflow

    • run pnpm check on push and pull_request
  5. chore: add husky pre-commit checks

    • initialize husky through the prepare script
    • run lint-staged from the pre-commit hook
    • apply eslint --fix and prettier --write to staged files
  6. chore: split tsconfig for check and build

    • use tsconfig.json as the noEmit typecheck entry
    • add tsconfig.build.json for webpack bundling
    • bind ts-loader to the build config explicitly

Validated with:

  • pnpm check
  • `pnpm build

@yangxu52 yangxu52 force-pushed the refactor/modernization-foundation branch from bc07e6e to 67053c6 Compare May 5, 2026 16:26
- switch development workflow from npm to pnpm
- require Node.js >=18.12.0 and pnpm >=10 via engines
- remove package-lock.json and keep pnpm-lock.yaml
- update build and debug docs to use pnpm
- fix webpack ts-loader exclude `node_modules` typo
@yangxu52 yangxu52 force-pushed the refactor/modernization-foundation branch from 67053c6 to e643853 Compare May 5, 2026 16:29
- ignore .local task artifacts and pnpm debug logs
- add editorconfig and gitattributes for basic repo formatting rules
- add prettier config and ignore rules
- add prettier as a dev dependency
@yangxu52 yangxu52 changed the title chore: adopt pnpm for repository development refactor: modernization project foundation May 5, 2026
@yangxu52 yangxu52 force-pushed the refactor/modernization-foundation branch from a24f259 to ea124de Compare May 5, 2026 17:12
- add ESLint 9 flat config
- add lint, tsc, and check scripts
- align tsconfig with noEmit checks
- add `@types` to fix `index.js` TS9006 issue
@yangxu52 yangxu52 force-pushed the refactor/modernization-foundation branch 2 times, most recently from 72de876 to 454e2b1 Compare May 5, 2026 17:31
yangxu52 added 3 commits May 6, 2026 01:31
- run pnpm check on push and pull_request
- initialize husky through the prepare script
- run lint-staged from the pre-commit hook
- apply eslint --fix and prettier --write to staged files
- use tsconfig.json as the noEmit typecheck entry
- add tsconfig.build.json for webpack bundling
- bind ts-loader to the build config explicitly
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