From 234ea9c4d52476321fe7f8ec93b3797e323e9bf4 Mon Sep 17 00:00:00 2001 From: Dominik Jelinek Date: Wed, 31 May 2023 20:54:44 +0200 Subject: [PATCH] fix: Improve TSconfig setup and fix errors in test/test-project Signed-off-by: Dominik Jelinek --- .vscode/settings.json | 5 ++++ locators/tsconfig.json | 29 +++++++------------ .../src/components/bottomBar/AbstractViews.ts | 2 +- page-objects/tsconfig.json | 28 ++++++------------ test/test-project/.eslintignore | 1 + test/test-project/.eslintrc.js | 6 ---- test/test-project/tsconfig.json | 24 ++++++++------- tsconfig.json | 6 ++-- 8 files changed, 43 insertions(+), 58 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 test/test-project/.eslintignore diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..649c6b94a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "eslint.workingDirectories": [ + "./test/test-project" + ] +} \ No newline at end of file diff --git a/locators/tsconfig.json b/locators/tsconfig.json index 43e2528b3..e66404675 100644 --- a/locators/tsconfig.json +++ b/locators/tsconfig.json @@ -1,20 +1,11 @@ { - "compilerOptions": { - "module": "node16", - "target": "es6", - "outDir": "out", - "lib": [ - "es6" - ], - "sourceMap": true, - "rootDir": ".", - "strict": true, - "noUnusedLocals": true, - "experimentalDecorators": true, - "resolveJsonModule": true, - "declaration": true - }, - "include": [ - "index.ts", "lib" - ] - } \ No newline at end of file + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "out", + "rootDir": "." + }, + "include": [ + "index.ts", + "lib" + ] +} \ No newline at end of file diff --git a/page-objects/src/components/bottomBar/AbstractViews.ts b/page-objects/src/components/bottomBar/AbstractViews.ts index d22ffbfd5..0472f2cda 100644 --- a/page-objects/src/components/bottomBar/AbstractViews.ts +++ b/page-objects/src/components/bottomBar/AbstractViews.ts @@ -84,7 +84,7 @@ export abstract class ChannelView extends ElementWithContexMenu { * View with channel selection and text area */ export abstract class TextView extends ChannelView { - protected actionsLabel!: string; + declare protected actionsLabel: string; /** * Get all text from the currently open channel diff --git a/page-objects/tsconfig.json b/page-objects/tsconfig.json index 1fbb03d08..f1a85d19c 100644 --- a/page-objects/tsconfig.json +++ b/page-objects/tsconfig.json @@ -1,20 +1,10 @@ { - "compilerOptions": { - "module": "node16", - "target": "es6", - "outDir": "out", - "lib": [ - "es6" - ], - "sourceMap": true, - "rootDir": "src", - "strict": true, - "noUnusedLocals": true, - "experimentalDecorators": true, - "resolveJsonModule": true, - "declaration": true - }, - "include": [ - "src" - ] - } \ No newline at end of file + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "out", + "rootDir": "src" + }, + "include": [ + "src" + ] +} \ No newline at end of file diff --git a/test/test-project/.eslintignore b/test/test-project/.eslintignore new file mode 100644 index 000000000..82a9a730d --- /dev/null +++ b/test/test-project/.eslintignore @@ -0,0 +1 @@ +.eslintrc.js \ No newline at end of file diff --git a/test/test-project/.eslintrc.js b/test/test-project/.eslintrc.js index 88fbfd55b..429e3f142 100644 --- a/test/test-project/.eslintrc.js +++ b/test/test-project/.eslintrc.js @@ -1,12 +1,6 @@ module.exports = { - "env": { - "browser": true, - "es6": true, - "node": true - }, "parser": "@typescript-eslint/parser", "parserOptions": { - "project": "tsconfig.json", "sourceType": "module" }, "plugins": [ diff --git a/test/test-project/tsconfig.json b/test/test-project/tsconfig.json index e885fa410..7ddaf18a0 100644 --- a/test/test-project/tsconfig.json +++ b/test/test-project/tsconfig.json @@ -1,15 +1,19 @@ { + "extends": "../../tsconfig.json", "compilerOptions": { - "module": "node16", - "target": "es6", "outDir": "out", - "lib": [ - "es6" - ], - "sourceMap": true, "rootDir": ".", - "resolveJsonModule": true, - "esModuleInterop": true + "forceConsistentCasingInFileNames": true, + "strict": false }, - "exclude": ["node_modules", ".vscode-test", "test-resources", "resources"] -} + "include": [ + "src" + ], + "exclude": [ + "resources", + "out", + "node_modules", + "test-extensions", + "test-resources" + ] +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 13aaefd97..2695d4615 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,10 @@ { "compilerOptions": { - "module": "node16", - "target": "es6", + "module": "Node16", + "target": "ES2022", "outDir": "out", "lib": [ - "es6" + "ES2022" ], "sourceMap": true, "rootDir": "src",