Skip to content

Commit b3f9de7

Browse files
authored
GLSP-1634: Update to eslint 9.x (#1638)
-Update eslint, config and transitive dependencies for 9.x Part of #1634 Also: - Minor fix in check:headers script and update of root scripts
1 parent e3d1cab commit b3f9de7

23 files changed

+923
-1336
lines changed

.eslintignore

Lines changed: 0 additions & 11 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@ lib
44
dist
55
tsconfig.tsbuildinfo
66
eslint.xml
7+
8+
# Agent specific files
9+
.claude/plans
10+
.claude/settings.local.json
11+
CLAUDE.local.md
12+
.reviews

.prettierignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,8 @@ package-lock.json
1414
yarn.lock
1515

1616
# Logs
17-
*.log
17+
*.log
18+
19+
# Claude Code
20+
.claude/
21+
.reviews/

AGENTS.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
5+
This repository is a Yarn workspaces monorepo for shared GLSP development tooling.
6+
7+
- `dev-packages/*`: publishable workspace packages (`cli`, `config`, `config-test`, `eslint-config`, `mocha-config`, `nyc-config`, `prettier-config`, `ts-config`, `dev`).
8+
- `dev-packages/cli/src`: TypeScript sources for the `glsp` CLI (`commands/` and `util/`).
9+
- `.github/workflows`: CI, release, and publishing workflows.
10+
- `docker/` and `releng/`: container and release-engineering assets.
11+
- Root configs: `eslint.config.mjs`, `tsconfig*.json`, `.prettierrc`, `lerna.json`.
12+
13+
## Build, Test, and Development Commands
14+
15+
Use Node `>=20` and Yarn classic (`>=1.7.0 <2`).
16+
17+
- `yarn install`: install dependencies and build via `prepare`.
18+
- `yarn build`: run `lerna run build` across workspaces.
19+
- `yarn watch`: watch CLI bundle changes.
20+
- `yarn lint` / `yarn lint:fix`: run ESLint (or auto-fix).
21+
- `yarn format` / `yarn format:check`: apply/check Prettier formatting.
22+
- `yarn check:headers`: verify copyright headers against git history.
23+
- `yarn check:pr`: CI-style local gate (`install`, lint, format check, headers).
24+
25+
## Coding Style & Naming Conventions
26+
27+
- Language: TypeScript for source code.
28+
- Formatting: Prettier (`.prettierrc`) with 4-space indentation, single quotes, no trailing commas, LF line endings.
29+
- JSON/YAML formatting uses 2-space indentation.
30+
- Linting: ESLint flat config (`eslint.config.mjs`) with GLSP shared rules.
31+
- Naming: keep command implementations in `dev-packages/cli/src/commands/*.ts`; shared helpers in `dev-packages/cli/src/util/*.ts`.
32+
33+
## Testing Guidelines
34+
35+
There is currently no root `test` script in this repository. Validate contributions with:
36+
37+
- `yarn build`
38+
- `yarn lint`
39+
- `yarn format:check`
40+
- `yarn check:headers`
41+
42+
For new testable packages, use GLSP shared test config (`@eclipse-glsp/config-test`) and Mocha/nyc conventions (`*.spec.ts`, coverage via `test:coverage`).
43+
44+
## Commit & Pull Request Guidelines
45+
46+
- Open an issue in `https://github.com/eclipse-glsp/glsp` before coding.
47+
- Branch naming: `issues/<issue_number>` (example: `issues/123`).
48+
- Commit messages: imperative subject; issue references are expected (examples in history include `GLSP-1594: ... (#1596)`).
49+
- Include closing reference with absolute URL, e.g. `closes https://github.com/eclipse-glsp/glsp/issues/241`.
50+
- PRs should include scope, linked issue, and pass CI; ensure `yarn.lock` has no unintended diff.
51+
- Ensure Eclipse Contributor Agreement (ECA) requirements are satisfied.

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@AGENTS.md

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ All changes on the master branch are deployed automatically to the corresponding
116116

117117
### Client packages
118118

119-
We recommend node in version 18 or higher:
119+
We recommend node in version 20 or higher:
120120

121121
```bash
122122
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
@@ -137,7 +137,7 @@ npm install -g lerna
137137

138138
### Server/Ide packages
139139

140-
You'll need Java 17 and maven.
140+
You'll need Java 21 and maven.
141141

142142
## Building
143143

dev-packages/cli/.eslintrc.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

dev-packages/cli/src/commands/check-header.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/********************************************************************************
2-
* Copyright (c) 2022-2025 EclipseSource and others.
2+
* Copyright (c) 2022-2026 EclipseSource and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -13,7 +13,6 @@
1313
*
1414
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
1515
********************************************************************************/
16-
/* eslint-disable max-len */
1716
import { Option } from 'commander';
1817
import * as fs from 'fs';
1918
import { glob } from 'glob';
@@ -44,6 +43,7 @@ export interface HeaderCheckOptions {
4443
json: boolean;
4544
excludeDefaults: boolean;
4645
autoFix: boolean;
46+
commit: boolean;
4747
}
4848

4949
const checkTypes = ['full', 'changes', 'lastCommit'] as const;
@@ -79,7 +79,8 @@ export const CheckHeaderCommand = baseCommand() //
7979
'Disables the default excludes patterns. Only explicitly passed exclude patterns (-e, --exclude) are considered'
8080
)
8181
.option('-j, --json', 'Also persist validation results as json file', false)
82-
.option('-a, --autoFix', 'Auto apply & commit fixes without prompting the user', false)
82+
.option('-a, --autoFix', 'Auto apply fixes without prompting the user', false)
83+
.option('--commit', 'When used with --autoFix, also create a git commit for the fixed files', false)
8384
.action(checkHeaders);
8485

8586
export function checkHeaders(rootDir: string, options: HeaderCheckOptions): void {
@@ -263,7 +264,7 @@ function fixViolations(rootDir: string, violations: DateValidationResult[], opti
263264
replaceInFile(violation.file, RegExp('Copyright \\([cC]\\) ' + currentRange), `Copyright (c) ${fixedRange}`);
264265
});
265266
LOGGER.newLine();
266-
if (options.autoFix || readline.keyInYN('Do you want to create a commit for the fixed files?')) {
267+
if (options.commit && (options.autoFix || readline.keyInYN('Do you want to create a commit for the fixed files?'))) {
267268
LOGGER.newLine();
268269
const files = violations.map(violation => violation.file).join(' ');
269270
exec(`git add ${files}`);

dev-packages/cli/src/commands/releng/common.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/********************************************************************************
2-
* Copyright (c) 2025 EclipseSource and others.
2+
* Copyright (c) 2025-2026 EclipseSource and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -14,8 +14,8 @@
1414
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
1515
********************************************************************************/
1616

17-
import path from 'path';
18-
import semver from 'semver';
17+
import * as path from 'path';
18+
import * as semver from 'semver';
1919
import { LOGGER, PackageHelper, configureExec, configureLogger, exec, getRemoteUrl, readFile, readPackage } from '../../util';
2020

2121
export type GLSPRepo = (typeof GLSPRepo.choices)[number];

0 commit comments

Comments
 (0)