Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .changeset/quiet-forges-format.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
---

No release note: this changes development and CI formatting only.
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# Java - 4 spaces (matches Prettier config)
[*.java]
indent_style = space
indent_size = 4
Expand Down
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Mechanical Palantir Java Format migration for #1464.
e3a585e41d093008f5d233ce4ed57e4aac64c526
2 changes: 0 additions & 2 deletions .github/workflows/ci-quality-gates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ jobs:
run: |
pnpm install --frozen-lockfile

# Every gate below is also in `pnpm run check`, which the pre-push hook runs and
# `--no-verify` skips. This step is the only place they are mandatory.
ISSUES_FOUND=()
FMT_OK=true; PMD_OK=true; LINT_OK=true; PIN_OK=true; TESTS_OK=true; TYPES_OK=true; SCRIPT_TYPES_OK=true; CONTRACTS_OK=true; ENV_OK=true; DOCS_OK=true; DIAGRAMS_OK=true; INSTRUCTIONS_OK=true

Expand Down
4 changes: 2 additions & 2 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const SCOPES = [

// === INFRASTRUCTURE SCOPES (tooling and process) ===
"ci", // GitHub Actions, CI workflows only
"config", // TOOLING ONLY: .prettierrc, renovate.json, eslint, vscode
"config", // Developer tooling configuration
// NOT for: application.yml (use 'server'), Dockerfiles (use service scope)
"deps-dev", // Dev dependencies only (test libs, linters)
"scripts", // Build/dev helper scripts
Expand Down Expand Up @@ -97,7 +97,7 @@ const helpfulErrorsPlugin = {
` Services: webapp, server, docs\n` +
` Infra: deps, security, db, docker, ci, config, deps-dev, scripts, release\n` +
` Features: auth, integration, scm, leaderboard, mentor, notifications, profile, teams, workspace\n\n` +
`⚠️ 'config' is for TOOLING only (.prettierrc, renovate.json)\n` +
`⚠️ 'config' is for developer tooling\n` +
` For runtime config use 'server', for Dockerfiles use service scope\n\n` +
`Format: <type>(<scope>): <description>\n` +
`Example: fix(server): resolve null pointer exception\n` +
Expand Down
2 changes: 1 addition & 1 deletion docs/contributor/ci-cd.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Before any release, code must pass:
| Migration chain + drift (`Database`) | Liquibase | Full chain applies empty → head, then schema is diffed against JPA entities |
| Changelog immutability (`Migrations`) | git diff | Released changesets + `master.xml` are append-only |
| OpenAPI sync | Diff check | Client ↔ Server sync |
| Java formatting | Prettier (`prettier-plugin-java`) | Code style |
| Java formatting | Spotless + Palantir Java Format | Code style |
| Java lint | PMD | Static analysis |
| Webapp TypeScript | oxlint + Biome (`webapp/biome.jsonc`) + tsc | Lint + format + typecheck |
| Everything else TypeScript | oxlint (`.oxlintrc.json`) + Biome (`biome.jsonc`) + tsc | oxlint reaches the Bun runtime, its specs, both precompute trees, `scripts/**`, `docs/` and the repo-root config files; Biome formats all of those except `docs/`, which has its own config (`docs/.oxlintrc.json`) and no formatter |
Expand Down
16 changes: 15 additions & 1 deletion docs/contributor/local-development.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,21 @@ pnpm run check # Complete local quality gate; every leg also run
Every `pnpm run check` leg also runs in CI. Run it locally before pushing because it fails faster and
reports the complete local gate in one command.

JetBrains alternatives such as IntelliJ (Java) and WebStorm (React/TypeScript) work equally well.
IntelliJ and WebStorm are also supported.

### Java formatting

```bash
pnpm run format:java
pnpm run format:java:check
```

The repository commands are the source of truth. Optional editor integrations:

- [IntelliJ](https://plugins.jetbrains.com/plugin/13180-palantir-java-format)
- [Eclipse](https://github.com/palantir/palantir-java-format/tree/develop/eclipse_plugin)

Other editors should run the repository command.

## Application server

Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"generate:api:application-server:client": "pnpm run generate:api:application-server:clean && pnpm --filter webapp run openapi-ts",
"generate:api:application-server": "pnpm run generate:api:application-server:specs && pnpm run generate:api:application-server:client",
"generate:api": "pnpm run generate:api:application-server",
"format:java": "node --import tsx scripts/run-quiet.ts prettier --write \"server/{application,generated-clients}/src/**/*.java\" --config-precedence prefer-file --config server/.prettierrc.yaml --ignore-path server/.prettierignore",
"format:java:check": "node --import tsx scripts/run-quiet.ts prettier --check \"server/{application,generated-clients}/src/**/*.java\" --config-precedence prefer-file --config server/.prettierrc.yaml --ignore-path server/.prettierignore",
"format:java": "node --import tsx scripts/run-mvnw.ts -pl application spotless:apply -q",
"format:java:check": "node --import tsx scripts/run-mvnw.ts -pl application spotless:check -q",
"lint:java": "pnpm run prepare:server:generated && node --import tsx scripts/run-mvnw.ts -f application/pom.xml compile pmd:check -q",
"lint:java:report": "pnpm run prepare:server:generated && node --import tsx scripts/run-mvnw.ts -f application/pom.xml compile pmd:pmd && echo 'Report: server/application/target/site/pmd.html'",
"pre-push": "pnpm run check",
Expand Down Expand Up @@ -115,8 +115,6 @@
"oxlint-tsgolint": "7.0.2001",
"patch-package": "8.0.1",
"pg": "8.20.0",
"prettier": "3.8.3",
"prettier-plugin-java": "2.8.1",
"tsx": "4.22.1",
"typescript": "7.0.2"
},
Expand Down
79 changes: 0 additions & 79 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions project.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@
"*.graphql": "graphql",
"*.graphqls": "graphql"
},
"[java]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true
Expand Down Expand Up @@ -84,7 +80,6 @@
"recommendations": [
"biomejs.biome",
"oxc.oxc-vscode",
"esbenp.prettier-vscode",
"editorconfig.editorconfig",
"vscjava.vscode-java-pack",
"redhat.java",
Expand Down
Loading
Loading