Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
NotificationsYou must be signed in to change notification settings

higherorderfunctor/example-typescript-eslint-bug

Repository files navigation

This repo demonstrates two bugs withtypescript-eslint usingEXPERIMENTAL_useProjectService.

  1. extends is not used in the default project'stsconfig.json.
  2. 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.

# remove from root package.json##    "patchedDependencies": {#      "@typescript-eslint/typescript-estree@7.11.0": "patches/@typescript-eslint__typescript-estree@7.11.0.patch"#    },pnpm ipnpm eslint.# <REDACTED>/packages/package-a/src/test-component.vue#   0:0  error  Parsing error: Cannot read properties of undefined (reading 'target')## <REDACTED>/packages/package-a/src/test.ts#   0:0  error  Parsing error: Cannot read properties of undefined (reading 'target')

Errors Without Patch With Workaround

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp