Skip to content

Commit

Permalink
Update ESLint, CI
Browse files Browse the repository at this point in the history
  • Loading branch information
alessiostalla committed Feb 14, 2025
1 parent f433bfd commit e906088
Show file tree
Hide file tree
Showing 12 changed files with 322 additions and 313 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

18 changes: 0 additions & 18 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
node-version: [18.x, 20.x]
node-version: [20.x, 22.x]

steps:
- uses: actions/checkout@v4
Expand Down
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,29 +121,32 @@
"publish-lib": "yarn dist && yarn publish --access public && yarn --use-yarnrc .yarnrc-github-packages publish"
},
"devDependencies": {
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.20.0",
"@lionweb/core": "^0.6.7",
"@lionweb/utilities": "^0.6.7",
"@tsconfig/recommended": "^1.0.3",
"@types/chai": "^4.3.11",
"@types/ecore": "^0.12.5",
"@types/jest": "^29.5.10",
"@types/node": "^18.19.2",
"@typescript-eslint/eslint-plugin": "^6.13.2",
"@typescript-eslint/parser": "^6.13.2",
"antlr4ng": "^3.0.4",
"@typescript-eslint/eslint-plugin": "^8.24.0",
"@typescript-eslint/parser": "^8.24.0",
"antlr4ng": "^3.0.14",
"antlr4ng-cli": "^2.0.0",
"chai": "^4.3.10",
"cmd-ts": "^0.13.0",
"cross-env": "^7.0.3",
"ecore": "^0.12.0",
"eslint": "^8.55.0",
"i18next": "^23.11.5",
"eslint": "^9.20.1",
"i18next": "^24.2.2",
"jest": "^29.7.0",
"merge-options": "^2.0.0",
"rimraf": "^3.0.0",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"typedoc": "^0.25.7",
"typescript": "^5.3.2"
"typescript": "^5.3.2",
"typescript-eslint": "^8.24.0"
}
}
4 changes: 1 addition & 3 deletions src/interop/ecore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,6 @@ export function generateASTClasses(model: ECore.EPackage): PackageDescription {
return pkg;
}

// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export function loadEPackages(data: any, resource: ECore.Resource): ECore.EPackage[] {
if(typeof data === "string") {
data = JSON.parse(data);
Expand Down Expand Up @@ -565,7 +564,7 @@ class ReferencesTracker {
let eClass;
try {
eClass = findEClass(uri, this.resource);
} catch (e) {
} catch {
//Not an eclass
}
if (eClass) {
Expand Down Expand Up @@ -735,7 +734,6 @@ function setChild(
* @param strict if true (the default), unknown attributes are an error, otherwise they're ignored.
* @param referencesTracker references tracker used to read references and solve them later (after loading all nodes)
*/
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
function importJsonObject(
obj: any, resource: ECore.Resource, eClass?: ECore.EClass,
strict = true, referencesTracker: ReferencesTracker = new ReferencesTracker(resource)): ECore.EObject {
Expand Down
1 change: 0 additions & 1 deletion src/interop/lionweb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ export class LionwebNode extends NodeAdapter {
super();
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
get(...path: string[]): LionwebNode | undefined {
let result: LionwebNode | undefined = undefined;
// eslint-disable-next-line @typescript-eslint/no-this-alias
Expand Down
6 changes: 3 additions & 3 deletions src/model/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function getNodeDefinition(node: Node | (abstract new (...args: any[]) =>
let metadataHolder;
try {
metadataHolder = new (node as any)();
} catch (_) {
} catch {
metadataHolder = node;
}
for(const p in definition.features) {
Expand All @@ -69,7 +69,7 @@ export function getNodeDefinition(node: Node | (abstract new (...args: any[]) =>
}
}
definition.resolved = true;
} catch (e) {
} catch {
//Ignore
}
}
Expand Down Expand Up @@ -116,7 +116,7 @@ export class SimpleOrigin extends Origin {
}
}

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


Expand Down
2 changes: 1 addition & 1 deletion src/transformation/transformation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ export class ASTTransformer {

try {
childNodeFactory.set(node, child);
} catch (e) {
} catch {
throw new Error(`Could not set child ${childNodeFactory}`);
}
}
Expand Down
9 changes: 0 additions & 9 deletions tests/.eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion tests/issues.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('Issues', function() {

it("has capitalized messages",
function () {
let issue = Issue.syntactic("unexpected token: foo", IssueSeverity.ERROR, undefined, undefined, SYNTAX_ERROR);
const issue = Issue.syntactic("unexpected token: foo", IssueSeverity.ERROR, undefined, undefined, SYNTAX_ERROR);
expect(issue.message).to.equal("Unexpected token: foo");
});
});
1 change: 1 addition & 0 deletions tests/json.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ describe('JSON generator', function() {
});
it("Wrongly configured node",
function () {
// eslint-disable-next-line @typescript-eslint/no-require-imports
expect(() => require("./wrong-node")).to.throw;
});
it("Node with resolved reference by name",
Expand Down
Loading

0 comments on commit e906088

Please sign in to comment.