Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions packages/ts-interface-generator/.eslintrc.js

This file was deleted.

63 changes: 63 additions & 0 deletions packages/ts-interface-generator/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
const { defineConfig, globalIgnores } = require("eslint/config");

const globals = require("globals");
const tsParser = require("@typescript-eslint/parser");
const typescriptEslint = require("@typescript-eslint/eslint-plugin");
const js = require("@eslint/js");

const { FlatCompat } = require("@eslint/eslintrc");

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

module.exports = defineConfig([
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},

parser: tsParser,
sourceType: "module",

parserOptions: {
project: [
"./tsconfig.json",
"./tsconfig-testcontrol.json",
"./tsconfig-tests.json",
],
tsconfigRootDir: __dirname,
},
},

extends: compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
),

plugins: {
"@typescript-eslint": typescriptEslint,
},

rules: {
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-ignore": "allow-with-description",
minimumDescriptionLength: 10,
},
],
},
},
globalIgnores([
"**/.eslintrc.js",
"**/someFile.js",
"**/*.gen.d.ts",
"src/test/samples/sampleWebComponent/**/*",
]),
]);
8 changes: 4 additions & 4 deletions packages/ts-interface-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
"@types/node": "24.7.2",
"@types/openui5": "1.127.0",
"@types/yargs": "17.0.33",
"@typescript-eslint/eslint-plugin": "7.14.1",
"@typescript-eslint/parser": "7.14.1",
"eslint": "8.57.0",
"@typescript-eslint/eslint-plugin": "8.46.1",
"@typescript-eslint/parser": "8.46.1",
"eslint": "9.37.0",
"jest": "30.2.0",
"npm-run-all": "4.1.5",
"ts-jest": "29.4.5",
Expand All @@ -51,7 +51,7 @@
"dependencies": {
"hjson": "3.2.2",
"loglevel": "1.9.2",
"yargs": "17.7.2"
"yargs": "18.0.0"
},
"peerDependencies": {
"typescript": ">=5.2.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/ts-interface-generator/src/addSourceExports.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import path = require("path");
import ts = require("typescript");
import path from "path";
import ts from "typescript";

/**
* This function aims to find the UI5-style global name for all exports of the given source file
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-interface-generator/src/astGenerationHelper.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ts = require("typescript");
import ts from "typescript";
import astToString from "./astToString";
import log from "loglevel";
import {
Expand Down
7 changes: 3 additions & 4 deletions packages/ts-interface-generator/src/generateTSInterfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import yargs from "yargs";

// configure yargs with the cli options as launcher
const version = `${pkgJson.version} (from ${__filename})`;
yargs.version(version);
yargs
const appArgs = yargs()
.version(version)
.option({
config: {
alias: "c",
Expand All @@ -33,7 +33,6 @@ yargs
},
})
.default("watch", false)
.default("loglevel", "info");
.default("loglevel", "info").argv as Args;

const appArgs = yargs.argv as Args;
main(appArgs);
Loading