|
| 1 | +# Repository Guidelines |
| 2 | + |
| 3 | +## Project Structure & Module Organization |
| 4 | +This repository is split into two main parts: |
| 5 | +- `client/`: TypeScript/Yarn workspace for the GLSP IDE integration package and workflow webapp example. |
| 6 | + - `client/packages/ide/src/`: reusable integration source. |
| 7 | + - `client/examples/workflow-webapp/src/`: example app source, bundled to `client/examples/workflow-webapp/app/`. |
| 8 | +- `server/`: Java 17 + Maven/Tycho Eclipse plugin build. |
| 9 | + - `server/plugins/org.eclipse.glsp.ide.editor/src/`: core Eclipse integration plugin. |
| 10 | + - `server/example/org.eclipse.glsp.ide.workflow.editor/src/`: workflow editor example plugin. |
| 11 | + - `server/releng/`: target platform, feature, and p2 repository modules. |
| 12 | + |
| 13 | +## Build, Test, and Development Commands |
| 14 | +- `cd client && yarn install`: install workspace dependencies (Node `>=20`, Yarn 1.x). |
| 15 | +- `cd client && yarn build`: compile TS packages and bundle the workflow webapp. |
| 16 | +- `cd client && yarn lint`: run ESLint on all TS/TSX sources. |
| 17 | +- `cd client && yarn format:check`: verify Prettier formatting. |
| 18 | +- `cd client && yarn check:pr`: CI-like client gate (`build`, `lint`, `format:check`, headers). |
| 19 | +- `cd client/examples/workflow-webapp && yarn test`: run Mocha specs (`*.spec.ts|tsx`) for the example app. |
| 20 | +- `cd server && mvn clean install`: build Eclipse bundles. |
| 21 | +- `cd server && mvn clean install -Pp2`: build including p2 artifacts. |
| 22 | +- `cd server && mvn checkstyle:check -B`: run Java style checks. |
| 23 | + |
| 24 | +## Coding Style & Naming Conventions |
| 25 | +- TypeScript: 4-space indentation, single quotes, trailing commas disabled, max line length 140 (see `.prettierrc`). |
| 26 | +- Linting: ESLint with `@eclipse-glsp` config (`client/.eslintrc.js`). |
| 27 | +- Java: follow Checkstyle rules configured via Maven (`maven-checkstyle-plugin`). |
| 28 | +- Naming: keep existing conventions (`*.spec.ts` for tests, PascalCase Java classes, kebab-case TS file names where already used). |
| 29 | + |
| 30 | +## Testing Guidelines |
| 31 | +Prefer targeted tests for changed behavior: |
| 32 | +- Client example tests live beside sources and should match `*.spec.ts`/`*.spec.tsx`. |
| 33 | +- Run `yarn check:pr` for client-side validation before opening a PR. |
| 34 | +- For server changes, run `mvn clean verify` (or at least `mvn clean install`) and `mvn checkstyle:check`. |
| 35 | + |
| 36 | +## Commit & Pull Request Guidelines |
| 37 | +- Create/track an umbrella issue first (`https://github.com/eclipse-glsp/glsp/issues/...`). |
| 38 | +- Branch naming in upstream repos follows `issues/{issue_number}`. |
| 39 | +- Reference the full issue URL in commit messages (not just `#123`). |
| 40 | +- Keep commit subjects short, imperative, and specific (history examples include `GLSP-1607: Fix deployment`). |
| 41 | +- PRs should include scope, rationale, test evidence (commands run), and screenshots/GIFs for UI changes. |
0 commit comments