From 38889fe7adeb1901da4451316107b6f4872cee3d Mon Sep 17 00:00:00 2001 From: Dorch <14124454+DDorch@users.noreply.github.com> Date: Wed, 10 Jan 2024 18:19:07 +0000 Subject: [PATCH] lint: try to fix Parsing error in spec.ts files Parsing error: ESLint was configured to run on `<tsconfigRootDir>/e2e/bief-empty-fields.e2e-spec.ts` using `parserOptions.project`: <tsconfigRootDir>/e2e/tsconfig.e2e.json --- .eslintrc.js | 4 ++-- e2e/tsconfig.e2e.json | 13 +++++++++---- src/tsconfig.spec.json | 18 ------------------ tsconfig.json | 2 +- 4 files changed, 12 insertions(+), 25 deletions(-) delete mode 100644 src/tsconfig.spec.json diff --git a/.eslintrc.js b/.eslintrc.js index 3c7aeb073..c82462bdc 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -6,7 +6,7 @@ It represents the closest reasonable ESLint configuration to this project's original TSLint configuration. We recommend eventually switching this configuration to extend from -the recommended rulesets in typescript-eslint. +the recommended rulesets in typescript-eslint. https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md Happy linting! 💖 @@ -18,7 +18,7 @@ module.exports = { }, "parser": "@typescript-eslint/parser", "parserOptions": { - "project": "tsconfig.json", + "project": ["./e2e/tsconfig.e2e.json"], "sourceType": "module" }, "plugins": [ diff --git a/e2e/tsconfig.e2e.json b/e2e/tsconfig.e2e.json index 6841529a9..bb83c8b25 100644 --- a/e2e/tsconfig.e2e.json +++ b/e2e/tsconfig.e2e.json @@ -6,9 +6,14 @@ "module": "commonjs", "downlevelIteration": true, "types": [ - "jasmine", - "jasminewd2", - "node" + "node", + "@wdio/globals/types", + "@wdio/jasmine-framework" ] - } + }, + "include": [ + "../src/**/*.ts", + "**/*.spec.ts", + "**/*.d.ts" + ] } diff --git a/src/tsconfig.spec.json b/src/tsconfig.spec.json deleted file mode 100644 index 814408024..000000000 --- a/src/tsconfig.spec.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "../tsconfig.base.json", - "compilerOptions": { - "outDir": "../out-tsc/spec", - "baseUrl": "./", - "types": [ - "jasmine", - "node" - ] - }, - "files": [ - "polyfills.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] -} diff --git a/tsconfig.json b/tsconfig.json index 26abde9a1..c04bacbf7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,7 @@ "path": "./src/tsconfig.app.json" }, { - "path": "./src/tsconfig.spec.json" + "path": "./e2e/tsconfig.e2e.json" } ] } \ No newline at end of file -- GitLab