Skip to content

chore: Add husky, prettier, dependabot, and root .gitignore - #9

Merged
nawforce merged 2 commits into
mainfrom
6-add-dev-tooling
Apr 26, 2026
Merged

nawforce merged 2 commits into
mainfrom
6-add-dev-tooling

Conversation

@kjonescertinia

Copy link
Copy Markdown
Contributor

Summary

Final additive piece of the apex-parser-aligned modernisation tracked in #6. No runtime behaviour changes.

  • Husky + lint-staged pre-commit: ESLint + Prettier on staged .ts in npm/; prettier-plugin-java on staged .java in jvm/. Reformatted the two existing hand-written Java files to establish a baseline (no logic changes).
  • Per-package .prettierrc: npm uses trailingComma=es5, arrowParens=avoid; jvm loads prettier-plugin-java.
  • .github/dependabot.yml: weekly updates with minor/patch grouping for /, /npm, /jvm, and github-actions. Pinned ignores for:
    • @types/node major bumps (tracks Node LTS declared in engines.node, not current Node major).
    • org.junit.jupiter major bumps (JUnit 6 needs Java 17; build targets <release>8</release>).
  • Root .gitignore: covers .metals/, .vscode/, .idea/, node_modules/.
  • npm/.gitignore: also ignore *.tgz from npm pack.
  • Root package.json: prepare: "husky", init now runs npm ci first so root devDeps install (and the husky hook activates) on fresh clones; node engines bumped to ^20.19.0 || ^22.13.0 || >=24 to match the npm package.

Test plan

  • rm -rf npm/{node_modules,dist,src/antlr} jvm/target && npm run init && npm run build — green
  • Husky pre-commit fires on this very commit (visible in commit output: lint-staged → prettier on the Java files).
  • CI Build workflow green

Final additive piece of the apex-parser-aligned modernisation (#6).
None of this changes runtime behaviour.

- Husky + lint-staged pre-commit: ESLint+Prettier on staged .ts in
  npm/, prettier-plugin-java on staged .java in jvm/. Reformatted the
  two existing hand-written Java files to establish a baseline.
- Per-package .prettierrc files (npm: trailingComma=es5, arrowParens=
  avoid; jvm: prettier-plugin-java).
- Dependabot config covering /, /npm, /jvm, and github-actions, with
  minor/patch grouping. Pinned ignores for @types/node (tracks Node
  LTS, not current major) and JUnit (5.x, since the build targets
  <release>8</release>).
- Root .gitignore for editor / node_modules state.
- npm/.gitignore: also ignore *.tgz from npm pack.
- Root package.json: prepare:husky, init now runs npm ci first, node
  engines bumped to match the npm side.
Without this, npm install at root picks up the user's global ~/.npmrc
(Certinia internal artifactory) and bakes those URLs into the root
package-lock.json. CI then fails trying to fetch tarballs from a
registry it can't reach.

The per-package npm/.npmrc already had this override; this just adds
the equivalent at the new root install introduced by the husky tooling.
@nawforce

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@nawforce
nawforce merged commit fea12b1 into main Apr 26, 2026
1 check passed
@nawforce
nawforce deleted the 6-add-dev-tooling branch April 26, 2026 10:25
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