allure-framework / allure-js

Allure integrations for JavaScript test frameworks
https://allurereport.org/
Apache License 2.0
217 stars 112 forks source link

Fix typescript-eslint issues #1006

Closed delatrie closed 3 weeks ago

delatrie commented 3 weeks ago

Context

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: