Skip to content

Commit ed1c122

Browse files
committed
INT-3366: Update eslint and other packages
1 parent adc5b10 commit ed1c122

File tree

6 files changed

+1286
-607
lines changed

6 files changed

+1286
-607
lines changed

eslint.config.mjs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// eslint.config.js
2+
import { defineConfig } from "eslint/config";
3+
import tinymceEslintPlugin from "@tinymce/eslint-plugin";
4+
5+
export default defineConfig([
6+
{
7+
plugins: {
8+
"@tinymce": tinymceEslintPlugin
9+
},
10+
extends: [
11+
"@tinymce/standard"
12+
],
13+
languageOptions: {
14+
parserOptions: {
15+
sourceType: "module",
16+
project: [
17+
"./tsconfig.json"
18+
]
19+
},
20+
},
21+
rules: {
22+
"no-underscore-dangle": "off",
23+
"@typescript-eslint/explicit-member-accessibility": "off",
24+
"@tinymce/prefer-fun": "off",
25+
"@typescript-eslint/member-ordering": "off",
26+
"quote-props": [
27+
2,
28+
"consistent-as-needed",
29+
{
30+
keywords: false
31+
}
32+
]
33+
}
34+
}
35+
]);

package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,29 @@
2424
"license": "MIT",
2525
"devDependencies": {
2626
"@ephox/agar": "^8.0.1",
27-
"@ephox/bedrock-client": "^14.1.1",
28-
"@ephox/bedrock-server": "^14.1.4",
27+
"@ephox/bedrock-client": "^15.0.0",
28+
"@ephox/bedrock-server": "^15.0.0",
2929
"@ephox/katamari": "^9.1.5",
3030
"@ephox/sugar": "^9.2.1",
3131
"@ephox/swag": "^4.6.0",
3232
"@tinymce/beehive-flow": "^0.19.0",
33-
"@tinymce/eslint-plugin": "^2.2.1",
33+
"@tinymce/eslint-plugin": "^3.0.0",
3434
"@types/esm": "^3.2.0",
3535
"@types/express": "^5.0.0",
36-
"@types/node": "^22.7.7",
37-
"@typescript-eslint/eslint-plugin": "^5.48.2",
38-
"@typescript-eslint/parser": "^5.48.2",
39-
"eslint": "^8.32.0",
36+
"@types/node": "^24.5.2",
37+
"@typescript-eslint/eslint-plugin": "^8.44.0",
38+
"@typescript-eslint/parser": "^8.44.0",
39+
"eslint": "^9.36.0",
40+
"eslint-config-eslint": "^13.0.0",
4041
"eslint-plugin-import": "^2.27.5",
4142
"eslint-plugin-prefer-arrow": "^1.2.3",
4243
"esm": "^3.2.25",
43-
"express": "^4.18.2",
44+
"express": "^5.1.0",
4445
"rollup": "^4.24.0",
4546
"tinymce": "^8.0.0",
4647
"ts-loader": "^9.4.2",
4748
"ts-node": "^10.9.1",
48-
"typescript": "~5.6.3",
49+
"typescript": "~5.9.2",
4950
"webpack": "^5.75.0"
5051
},
5152
"dependencies": {

src/demo/ts/Server.ts

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

src/main/ts/component/Editor.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ const lookup = <T extends Record<string, unknown>, K extends keyof T>(values: T)
4343

4444
const parseGlobal = Resolve.resolve;
4545
const parseString = Fun.identity;
46-
const parseFalseOrString = lookup({ 'false': false as const });
47-
const parseBooleanOrString = lookup({ 'true': true, 'false': false });
46+
const parseFalseOrString = lookup({ false: false });
47+
const parseBooleanOrString = lookup({ true: true, false: false });
4848
const parseNumberOrString = (value: string) => /^\d+$/.test(value) ? Number.parseInt(value, 10) : value;
4949

5050
const configAttributes: Record<string, (v: string) => unknown> = {
@@ -279,7 +279,10 @@ class TinyMceEditor extends HTMLElement {
279279
}
280280
};
281281
// use target
282-
this._getTinymce().init(conf);
282+
this._getTinymce().init(conf).catch((err) => {
283+
/* eslint-disable no-console */
284+
console.error('TinyMCE init failed', err);
285+
});
283286
}
284287

285288
private _getTinymceSrc(): string {
@@ -451,4 +454,3 @@ class TinyMceEditor extends HTMLElement {
451454
export default () => {
452455
window.customElements.define('tinymce-editor', TinyMceEditor);
453456
};
454-

src/test/ts/browser/LoadTest.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ UnitTest.asynctest('LoadTest', (success, failure) => {
3131
seenInit = true;
3232
};
3333
}),
34-
Step.sync(() => makeTinymceElement({ setup: 'customElementTinymceSetup', 'on-init': 'customElementTinymceInit' }, '<p>Hello world</p>')),
34+
Step.sync(() => makeTinymceElement({
35+
'setup': 'customElementTinymceSetup',
36+
'on-init': 'customElementTinymceInit'
37+
}, '<p>Hello world</p>')),
3538
Waiter.sTryUntilPredicate('Waiting for editor setup', () => seenSetup),
3639
Waiter.sTryUntilPredicate('Waiting for editor init', () => seenInit),
3740
Step.sync(() => {

0 commit comments

Comments
 (0)