You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
This repo demonstrates two bugs withtypescript-eslint usingEXPERIMENTAL_useProjectService.
extends is not used in the default project'stsconfig.json.
parserOptions.extraFileExtensions is not working as expected to setuptsserver for type checking using project references.
pnpm is required to test the patch in this repo which contains a (non-rigorous)fix to resolve both issues.
Expected Errors With Patch
Using the patch, these errors are expected and correctly reported.
pnpm ipnpm eslint.# <REDACTED>/packages/package-a/src/test-component.vue# 8:7 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment# 8:34 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any## <REDACTED>/packages/package-a/src/test.ts# 7:14 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment# 7:41 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
Errors Without Patch
These errors are not expected usingtypescript-eslint as is and reveals the extendsintsconfig.json is not followed.
This attempts to work around the issue by using a project-leveltsconfig.eslint.jsonthat does not extend.
It reveals a new issue on line 4 wheretest-component.vue is not associatedwithpackages/package-a/src/tsconfig.src.json by following the project referenceswhich is expected to work withextraFileExtensions.
# remove from root package.json (if not already done)## "patchedDependencies": {# "@typescript-eslint/typescript-estree@7.11.0": "patches/@typescript-eslint__typescript-estree@7.11.0.patch"# },pnpm eslint -c eslint.config2.js.# <REDACTED>/packages/package-a/src/test-component.vue# 4:7 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment# 8:7 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment# 8:34 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any## <REDACTED>/packages/package-a/src/test.ts# 7:14 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment# 7:41 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any