The PR fixes invalid tsconfig resolution by package's typescript-eslint configurations. Previously, each package's parserOptions.project option (except the one of newman-reporter-allure) was resolved to the root tsconfig.json leading to typing issues when accessing a package's sub-paths (e.g., import type { /* ... */ } from "allure-js-commons/sdk"). That was because of "moduleResolution": "node" in the root config which doesn't support exports in package.json.
The fix is to provide parserOptions.tsconfigRootDir together with parserOptions.project for each package.
Additional changes
The PR also addressed the following previously hidden linting-related issues:
Parsing error: ESLint was configured to run on /.eslintrc.cjs using parserOptions.project: However, none of those TSConfigs include this file
Note:fixed by disabling the typed checks since we don't need them much in a config file. Another option would be to include .eslintrc.cjs in each tsconfig.test.json (see here).
In packages/allure-codeceptjs/src/reporter.ts, packages/allure-codeceptjs/test/spec/runtime/legacy/attachments.test.ts, and packages/allure-codeceptjs/test/spec/runtime/modern/attachments.test.ts: @typescript-eslint/no-unnecessary-type-assertion.
Context
The PR fixes invalid tsconfig resolution by package's typescript-eslint configurations. Previously, each package's
parserOptions.project
option (except the one ofnewman-reporter-allure
) was resolved to the roottsconfig.json
leading to typing issues when accessing a package's sub-paths (e.g.,import type { /* ... */ } from "allure-js-commons/sdk"
). That was because of"moduleResolution": "node"
in the root config which doesn't support exports in package.json.The fix is to provide
parserOptions.tsconfigRootDir
together withparserOptions.project
for each package.Additional changes
The PR also addressed the following previously hidden linting-related issues:
.eslintrc.cjs
in eachtsconfig.test.json
(see here).tsconfig.test.json
in allure-js-commons..eslintrc.cjs
: quote-props.packages/allure-codeceptjs/src/reporter.ts
,packages/allure-codeceptjs/test/spec/runtime/legacy/attachments.test.ts
, andpackages/allure-codeceptjs/test/spec/runtime/modern/attachments.test.ts
: @typescript-eslint/no-unnecessary-type-assertion.