Skip to content

chore: update project configuration and add linting/formatting tools#23

Merged
amirabbas-gh merged 8 commits into
mainfrom
chore/update-project-configuration
Jun 15, 2026
Merged

chore: update project configuration and add linting/formatting tools#23
amirabbas-gh merged 8 commits into
mainfrom
chore/update-project-configuration

Conversation

@amirabbas-gh

@amirabbas-gh amirabbas-gh commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator
  • Added .lintstagedrc.mjs for linting and formatting staged files.
  • Introduced .oxfmtrc.json and .oxlintrc.json for formatting and linting configurations.
  • Created .nvmrc to specify Node.js version 22.
  • Updated .gitignore to exclude build artifacts and temporary files.
  • Removed obsolete biome.jsonc and package-lock.json files.
  • Updated CONTRIBUTING.md and AGENTS.md with new setup instructions and common pitfalls.
  • Adjusted CI workflows to use pnpm and updated paths for quality checks.
  • update publish flow:
flowchart TD
  A[Feature PR merged to main] --> B{Pending changesets?}
  B -->|Yes| C[release.yml creates Version Packages PR]
  B -->|Yes| D[publish.yml skips]
  C --> E[Merge Version Packages PR]
  E --> F[publish.yml tags + publishes changed packages]
  B -->|No| G[publish.yml runs but finds nothing new]
Loading

Big respect to @AugustinMauroy for the code-quality.yaml action, I took a lot of inspiration from their work when building my own ci.yaml action ❤️

@mohab-sameh mohab-sameh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@amirabbas-gh Please check the findings below.

@mohab-sameh mohab-sameh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some findings

done < <(find codemods -path '*/node_modules/*' -prune -o -name codemod.yaml -print | sort)

for tag in "${new_tags[@]}"; do
git push origin "refs/tags/$tag"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: This pushes release tags before the publish job runs. If codemod/publish-action fails after tags have been pushed, a full workflow rerun will see those tags as already released, output changed_dirs=[], and skip publishing. Please decouple publish candidates from tag existence, or push tags only after publishing succeeds.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think the dependency should be based on the tag, because in this flow the tag should already be published before the publish workflow runs.
What’s your opinion on this, @AugustinMauroy?

Comment thread CONTRIBUTING.md Outdated

Three workflows support quality and releases:

- **`code-quality.yml` — Lint & types:** runs format, lint, and typecheck on every matching PR/push.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P3: This still documents code-quality.yml, but this PR deletes that workflow and replaces it with .github/workflows/ci.yaml. The surrounding text also says PR CI is affected-package and cross-platform, while the new CI is single Ubuntu full-repo checks. Please update this section to match the new workflow.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@mohab-sameh

Copy link
Copy Markdown
Contributor

P2: This PR changes codemods/sample-codemod/* but does not include a changeset, while the new policy requires one for codemod package changes. I verified this with pnpm changeset status --since=origin/main, which fails with “Some packages have been changed but no changesets were found.” Please add a real or empty changeset, or add the documented skip mechanism plus CI coverage.

Comment thread .github/workflows/ci.yaml Outdated
jobs:
ci:
name: CI
runs-on: ubuntu-latest

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
runs-on: ubuntu-latest
runs-on: ubuntu-slim

Comment thread .github/workflows/ci.yaml Outdated
Comment on lines +21 to +24
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm

ubuntu-slim already ship node LTS

Comment thread .github/workflows/ci.yaml Outdated

- run: pnpm run check-types

- run: pnpm test

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

check on node/userland-migrations Jacob write a small bash command that only run test on the workspace that require it

Comment thread docs/CODEMOD-TEMPLATE.md Outdated
├── workflow.yaml
├── SKILL.md
├── package.json
├── tsconfig.json

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why running it for each codemod ?

@amirabbas-gh

Copy link
Copy Markdown
Collaborator Author

Thank you so much, @AugustinMauroy, for your excellent review! I've changed ubuntu-latest to ubuntu-slim, and I took inspiration from Jacob's approach for pnpm test so that it only runs for the codemods that have changed. TypeScript is now configured globally for the monorepo as well.

I've carefully addressed all the points you mentioned.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you should add https://github.com/step-security/harden-runner on publish to have report of network transit and it's help to avoid supply chain attack

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@AugustinMauroy I’d prefer to add this to the publish-action. Thanks for the recommendation!

Comment thread tsconfig.json Outdated
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"esModuleInterop": true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
"esModuleInterop": true
"esModuleInterop": true,
"erasableSyntaxOnly": true

it's how node & jssg act on typescript https://www.totaltypescript.com/erasable-syntax-only

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@AugustinMauroy AugustinMauroy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGMT !

@amirabbas-gh amirabbas-gh requested a review from mohab-sameh June 15, 2026 12:01
@amirabbas-gh amirabbas-gh merged commit 16f63eb into main Jun 15, 2026
1 check passed
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.

3 participants