Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: typescript-eslint v7 config file fails tsc validation #8478

Closed
4 tasks done
NotArpit opened this issue Feb 15, 2024 · 1 comment
Closed
4 tasks done

Bug: typescript-eslint v7 config file fails tsc validation #8478

NotArpit opened this issue Feb 15, 2024 · 1 comment
Labels
bug Something isn't working duplicate This issue or pull request already exists package: typescript-eslint Issues related to the typescript-eslint package

Comments

@NotArpit
Copy link

NotArpit commented Feb 15, 2024

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Relevant Package

typescript-eslint

Playground Link

No response

Repro Code

/* eslint.config.js */
// @ts-check

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

export default tseslint.config(
  eslint.configs.recommended,
  ...tseslint.configs.recommended,
);

ESLint Config

// @ts-check

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

export default tseslint.config(
  eslint.configs.recommended,
  ...tseslint.configs.recommended,
);

tsconfig

{
  "compilerOptions": {
    "target": "ES2020",
    "module": "nodenext",
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "strict": true,
    "skipLibCheck": true
  }
}

Expected Result

The import tseslint from 'typescript-eslint' line has no errors from the language-server. There is another bug (presumably related?) where ESLint complains about the use of import. Namely

Parsing error: The keyword 'import' is reserved eslint

Actual Result

The import tseslint from 'typescript-eslint' line errors from the language-server about Cannot find module 'typescript-eslint' or its corresponding type declarations.ts(2307). Removing the // @ts-check directive fixes this error however I don't believe this is the expected behaviour?

Additional Info

TSServer points to node_modules/typescript/lib.

Versions

package version
typescript-eslint ^7.0.1
typescript ^5.3.3
eslint ^8.56.0
node 20.11.0
pnpm 8.15.2
@NotArpit NotArpit added bug Something isn't working triage Waiting for maintainers to take a look labels Feb 15, 2024
@NotArpit NotArpit changed the title Bug: typescript-eslint v7 config file fails eslint validation Bug: typescript-eslint v7 config file fails tsc validation Feb 15, 2024
@bradzacher
Copy link
Member

Duplicate of #8459 and should be fixed by #8460

@bradzacher bradzacher closed this as not planned Won't fix, can't repro, duplicate, stale Feb 15, 2024
@bradzacher bradzacher added duplicate This issue or pull request already exists package: typescript-eslint Issues related to the typescript-eslint package and removed triage Waiting for maintainers to take a look labels Feb 15, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working duplicate This issue or pull request already exists package: typescript-eslint Issues related to the typescript-eslint package
Projects
None yet
Development

No branches or pull requests

2 participants