Skip to content

Commit be425c3

Browse files
authored
Dependencies update (#169)
* Updated dependencies * react 19: JSX namespace changed to React.JSX * fix usage of render changed since react 18 * fix linter errors * ported eslint configuration to flat config format * updated tsconfigs, moved the one for memory window Removed unused dependencies: * @types/chai * @types/mocha * chai Full list of updated dependencies: * @types/node 20.19.4 * @types/react 19.1.8 * @types/react-dom 19.1.6 * @typescript-eslint/eslint-plugin 8.35.1 * @typescript-eslint/parser 8.35.1 * @vscode/vsce 3.6.0 * esbuild 0.25.5 * esbuild-sass-plugin 3.3.1 * eslint 9.30.1 * eslint-config-prettier 10.1.5 * globals 16.3.0 * prettier 3.6.2 * react 19.1.0 * react-dom 19.1.0 * typescript 5.8.3 * typescript-eslint 8.35.1 --------- Signed-off-by: Jens Reinecke <jens.reinecke@arm.com>
1 parent f82c511 commit be425c3

File tree

11 files changed

+1333
-787
lines changed

11 files changed

+1333
-787
lines changed

.eslintignore

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

.eslintrc.js

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

esbuild.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// @ts-check
22
const esbuild = require('esbuild');
33
const path = require('node:path');
4-
const os = require('node:os');
54
const { sassPlugin } = require('esbuild-sass-plugin');
65

76
/** @typedef {import('esbuild').BuildOptions} BuildOptions */

eslint.config.mjs

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
// eslint.config.mjs
2+
import js from '@eslint/js';
3+
import tseslint from 'typescript-eslint';
4+
import prettier from 'eslint-config-prettier';
5+
import globals from 'globals';
6+
7+
const jsLanguageOptions = {
8+
globals: {
9+
// Add any specific globals you need
10+
...globals.node,
11+
},
12+
};
13+
14+
const tsLanguageOptions = {
15+
parser: tseslint.parser,
16+
parserOptions: {
17+
project: './tsconfig.json',
18+
},
19+
ecmaVersion: 2015,
20+
sourceType: 'module',
21+
globals: {
22+
// Add any specific globals you need
23+
...globals.node,
24+
},
25+
};
26+
27+
export default [
28+
{
29+
ignores: [
30+
// don't ever lint node_modules
31+
'**/node_modules/**',
32+
// don't lint build output (make sure
33+
// it's set to your correct build folder name)
34+
'dist/**',
35+
],
36+
},
37+
{
38+
// Javascript files like build and config scripts
39+
files: ['**/*.js'],
40+
...js.configs.recommended,
41+
languageOptions: jsLanguageOptions,
42+
},
43+
// Recommended rules config array must only apply
44+
// to Typescript files, not plain Javascript, and
45+
// should use same language options as
46+
...tseslint.configs.recommended.map((config) => ({
47+
files: ['**/*.ts', '**/*.tsx'],
48+
...config,
49+
languageOptions: tsLanguageOptions,
50+
})),
51+
{
52+
files: ['**/*.ts', '**/*.tsx'],
53+
languageOptions: tsLanguageOptions,
54+
plugins: {
55+
'@typescript-eslint': tseslint.plugin,
56+
},
57+
rules: {
58+
...prettier.rules,
59+
'@typescript-eslint/no-explicit-any': 'off',
60+
'no-unused-vars': 'off',
61+
'@typescript-eslint/no-unused-vars': [
62+
'warn',
63+
{
64+
argsIgnorePattern: '^_',
65+
varsIgnorePattern: '^_',
66+
caughtErrorsIgnorePattern: '^_',
67+
},
68+
],
69+
// For backwards compatibility with older recommended rules
70+
// in eslint/typescript-eslint, based on existing "disable"
71+
// directives
72+
'@typescript-eslint/no-non-null-assertion': 'error',
73+
},
74+
},
75+
];

package.json

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -784,28 +784,27 @@
784784
"dependencies": {
785785
"cdt-amalgamator": "^0.0.11",
786786
"cdt-gdb-adapter": "^1.0.11",
787-
"react": "^17.0.2",
788-
"react-dom": "^17.0.2"
787+
"react": "^19.1.0",
788+
"react-dom": "^19.1.0"
789789
},
790790
"devDependencies": {
791-
"@types/chai": "^4.3.4",
792-
"@types/mocha": "^9.1.0",
793-
"@types/node": "~20.14.15",
794-
"@types/react": "^17.0.38",
795-
"@types/react-dom": "^17.0.11",
791+
"@types/node": "^20.19.4",
792+
"@types/react": "^19.1.8",
793+
"@types/react-dom": "^19.1.6",
796794
"@types/vscode": "^1.78.0",
797-
"@typescript-eslint/eslint-plugin": "^5.54.0",
798-
"@typescript-eslint/parser": "^5.54.0",
799-
"@vscode/vsce": "^3.2.1",
800-
"chai": "^4.3.7",
801-
"esbuild": "^0.19.2",
802-
"esbuild-sass-plugin": "^2.13.0",
803-
"eslint": "^8.35.0",
804-
"eslint-config-prettier": "^8.6.0",
795+
"@typescript-eslint/eslint-plugin": "^8.35.1",
796+
"@typescript-eslint/parser": "^8.35.1",
797+
"@vscode/vsce": "^3.6.0",
798+
"esbuild": "^0.25.5",
799+
"esbuild-sass-plugin": "^3.3.1",
800+
"eslint": "^9.30.1",
801+
"eslint-config-prettier": "^10.1.5",
805802
"event-stream": "^4.0.1",
803+
"globals": "^16.3.0",
806804
"npm-run-all": "^4.1.5",
807-
"prettier": "2.8.4",
808-
"typescript": "^4.9.5"
805+
"prettier": "3.6.2",
806+
"typescript": "^5.8.3",
807+
"typescript-eslint": "^8.35.1"
809808
},
810809
"bundledDependencies": [
811810
"cdt-gdb-adapter"

src/memory/client/MemoryBrowser.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ class ReverseIterator implements Iterator<number> {
6868
}
6969
}
7070

71-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
71+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
7272
interface Props {}
7373

7474
interface State {
7575
memory?: MemoryContents;
76-
error?: JSX.Element;
76+
error?: React.JSX.Element;
7777
bytesPerRow: number;
7878
bytesPerGroup: number;
7979
endianness: 'le' | 'be';
@@ -252,7 +252,7 @@ export class MemoryBrowser extends React.Component<Props, State> {
252252
const bytes = this.hex2bytes(this.state.memory.data);
253253
const address = parseInt(this.state.memory.address, 16);
254254

255-
const rows: JSX.Element[] = [];
255+
const rows: React.JSX.Element[] = [];
256256

257257
for (
258258
let rowOffset = 0;

src/memory/client/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
* SPDX-License-Identifier: EPL-2.0
99
*********************************************************************/
1010
import * as React from 'react';
11-
import * as ReactDOM from 'react-dom';
11+
import * as ReactDOMClient from 'react-dom/client';
1212
import { MemoryBrowser } from './MemoryBrowser';
1313

14-
ReactDOM.render(<MemoryBrowser />, document.getElementById('app'));
14+
const container = document.getElementById('app') as ReactDOMClient.Container;
15+
ReactDOMClient.createRoot(container).render(<MemoryBrowser />);

src/memory/client/tsconfig.json

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

src/memory/tsconfig.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": "../../tsconfig.json",
3+
"compilerOptions": {
4+
"composite": true,
5+
"outDir": "../../dist/memory",
6+
"rootDir": ".",
7+
"esModuleInterop": true
8+
},
9+
"include": ["client/*", "common/*"],
10+
"exclude": ["server"]
11+
}

tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,5 @@
1616
"sourceMap": true,
1717
"preserveWatchOutput": true
1818
},
19-
"references": [{ "path": "src/memory/client/tsconfig.json" }],
20-
"exclude": ["**/client/*"]
19+
"references": [{ "path": "src/memory/tsconfig.json" }],
2120
}

0 commit comments

Comments
 (0)