Skip to content

Commit 131aa27

Browse files
committed
Merge branch 'master' into chore/update-lionweb
# Conflicts: # package.json # yarn.lock
2 parents 03cf317 + 7d73abe commit 131aa27

11 files changed

+484
-687
lines changed

.eslintignore

-2
This file was deleted.

.eslintrc.js

-18
This file was deleted.

eslint.config.mjs

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import typescriptEslint from "@typescript-eslint/eslint-plugin";
2+
import tsParser from "@typescript-eslint/parser";
3+
import eslint from '@eslint/js';
4+
import tseslint from 'typescript-eslint';
5+
6+
export default tseslint.config(
7+
{
8+
ignores: ["tests/parser/*.ts"]
9+
},
10+
eslint.configs.recommended,
11+
tseslint.configs.recommended,
12+
{
13+
plugins: {
14+
"@typescript-eslint": typescriptEslint,
15+
},
16+
languageOptions: {
17+
parser: tsParser,
18+
},
19+
rules: {
20+
"@typescript-eslint/explicit-module-boundary-types": "off",
21+
"@typescript-eslint/no-explicit-any": "off",
22+
"@typescript-eslint/no-non-null-assertion": "off",
23+
},
24+
files: ["src/**/*.ts"]
25+
}, {
26+
plugins: {
27+
"@typescript-eslint": typescriptEslint,
28+
},
29+
30+
languageOptions: {
31+
parser: tsParser,
32+
},
33+
rules: {
34+
"@typescript-eslint/no-explicit-any": "off",
35+
"@typescript-eslint/no-unused-vars": 0,
36+
"@typescript-eslint/no-var-requires": 0,
37+
"@typescript-eslint/no-unused-expressions": 0, // Fails with expect(...).to.be.undefined;
38+
},
39+
files: ["tests/**/*.ts"]
40+
});

package.json

+21-18
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@
8888
"reflect-metadata": "^0.1.13"
8989
},
9090
"peerDependencies": {
91-
"@lionweb/core": "^0.6.12",
92-
"@lionweb/utilities": "^0.6.12",
93-
"antlr4ng": "^3.0.14",
91+
"@lionweb/core": "^0.6.7",
92+
"@lionweb/utilities": "^0.6.7",
93+
"antlr4ng": "^3.0.4",
9494
"cmd-ts": "^0.13.0",
9595
"ecore": "^0.12.0"
9696
},
@@ -121,29 +121,32 @@
121121
"publish-lib": "yarn dist && yarn publish --access public && yarn --use-yarnrc .yarnrc-github-packages publish"
122122
},
123123
"devDependencies": {
124-
"@lionweb/core": "^0.6.12",
125-
"@lionweb/utilities": "^0.6.12",
126-
"@tsconfig/recommended": "^1.0.8",
127-
"@types/chai": "^5.0.1",
124+
"@eslint/eslintrc": "^3.2.0",
125+
"@eslint/js": "^9.20.0",
126+
"@lionweb/core": "^0.6.7",
127+
"@lionweb/utilities": "^0.6.7",
128+
"@tsconfig/recommended": "^1.0.3",
129+
"@types/chai": "^4.3.11",
128130
"@types/ecore": "^0.12.5",
129-
"@types/jest": "^29.5.14",
131+
"@types/jest": "^29.5.10",
130132
"@types/node": "^18.19.2",
131-
"@typescript-eslint/eslint-plugin": "^6.21.0",
132-
"@typescript-eslint/parser": "^6.21.0",
133+
"@typescript-eslint/eslint-plugin": "^8.24.0",
134+
"@typescript-eslint/parser": "^8.24.0",
133135
"antlr4ng": "^3.0.14",
134136
"antlr4ng-cli": "^2.0.0",
135-
"chai": "^5.1.2",
137+
"chai": "^4.3.10",
136138
"cmd-ts": "^0.13.0",
137139
"cross-env": "^7.0.3",
138140
"ecore": "^0.12.0",
139-
"eslint": "^8.57.1",
141+
"eslint": "^9.20.1",
140142
"i18next": "^24.2.2",
141143
"jest": "^29.7.0",
142-
"merge-options": "^3.0.4",
143-
"rimraf": "^6.0.1",
144-
"ts-jest": "^29.2.5",
145-
"ts-node": "^10.9.2",
146-
"typedoc": "^0.27.7",
147-
"typescript": "^5.3.3"
144+
"merge-options": "^2.0.0",
145+
"rimraf": "^3.0.0",
146+
"ts-jest": "^29.1.1",
147+
"ts-node": "^10.9.1",
148+
"typedoc": "^0.25.7",
149+
"typescript": "^5.3.2",
150+
"typescript-eslint": "^8.24.0"
148151
}
149152
}

src/interop/ecore.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,6 @@ export function generateASTClasses(model: ECore.EPackage): PackageDescription {
499499
return pkg;
500500
}
501501

502-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
503502
export function loadEPackages(data: any, resource: ECore.Resource): ECore.EPackage[] {
504503
if(typeof data === "string") {
505504
data = JSON.parse(data);
@@ -565,7 +564,7 @@ class ReferencesTracker {
565564
let eClass;
566565
try {
567566
eClass = findEClass(uri, this.resource);
568-
} catch (e) {
567+
} catch {
569568
//Not an eclass
570569
}
571570
if (eClass) {
@@ -735,7 +734,6 @@ function setChild(
735734
* @param strict if true (the default), unknown attributes are an error, otherwise they're ignored.
736735
* @param referencesTracker references tracker used to read references and solve them later (after loading all nodes)
737736
*/
738-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
739737
function importJsonObject(
740738
obj: any, resource: ECore.Resource, eClass?: ECore.EClass,
741739
strict = true, referencesTracker: ReferencesTracker = new ReferencesTracker(resource)): ECore.EObject {

src/interop/lionweb.ts

-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ export class LionwebNode extends NodeAdapter {
199199
super();
200200
}
201201

202-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
203202
get(...path: string[]): LionwebNode | undefined {
204203
let result: LionwebNode | undefined = undefined;
205204
// eslint-disable-next-line @typescript-eslint/no-this-alias

src/model/model.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export function getNodeDefinition(node: Node | (abstract new (...args: any[]) =>
5555
let metadataHolder;
5656
try {
5757
metadataHolder = new (node as any)();
58-
} catch (_) {
58+
} catch {
5959
metadataHolder = node;
6060
}
6161
for(const p in definition.features) {
@@ -69,7 +69,7 @@ export function getNodeDefinition(node: Node | (abstract new (...args: any[]) =>
6969
}
7070
}
7171
definition.resolved = true;
72-
} catch (e) {
72+
} catch {
7373
//Ignore
7474
}
7575
}
@@ -116,7 +116,7 @@ export class SimpleOrigin extends Origin {
116116
}
117117
}
118118

119-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
119+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
120120
export interface Destination {}
121121

122122

src/transformation/transformation.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ export class ASTTransformer {
330330

331331
try {
332332
childNodeFactory.set(node, child);
333-
} catch (e) {
333+
} catch {
334334
throw new Error(`Could not set child ${childNodeFactory}`);
335335
}
336336
}

tests/.eslintrc.js

-9
This file was deleted.

tests/json.test.ts

+1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ describe('JSON generator', function() {
9696
});
9797
it("Wrongly configured node",
9898
function () {
99+
// eslint-disable-next-line @typescript-eslint/no-require-imports
99100
expect(() => require("./wrong-node")).to.throw;
100101
});
101102
it("Node with resolved reference by name",

0 commit comments

Comments
 (0)