Skip to content

Multiple TypeScript errors when type checking eslint.config.js examples from documentation #1068

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

Closed
2 tasks done
dschuessler opened this issue Feb 10, 2025 · 1 comment
Closed
2 tasks done

Comments

@dschuessler
Copy link

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.

What version of ESLint are you using?

9.20.0

What version of eslint-plugin-svelte are you using?

2.46.1

What did you do?

The example configuration from the documentation has type errors when checked with TypeScript.

Steps to reproduce:

  1. git clone https://github.com/dschuessler/eslint-plugin-svelte-bug
  2. cd eslint-plugin-svelte-bug
  3. npm install
  4. Open folder in VSCode.
  5. Open eslint.config.js in VSCode.

What did you expect to happen?

No errors, because the file is taken from the documentation.

What actually happened?

Multiple Typescript errors:

At line 5:

Module '"/Users/dennis/Library/Caches/typescript/5.6/node_modules/@types/espree/index"' has no default export.ts(1192)

At line 7:

Cannot find name 'js'.

At line 8:

Type 'LegacyConfig<RulesRecord, RulesRecord>' must have a '[Symbol.iterator]()' method that returns an iterator.ts(2488)

Link to GitHub Repo with Minimal Reproducible Example

https://github.com/dschuessler/eslint-plugin-svelte-bug

Additional comments

Thank you for your work!

@baseballyama
Copy link
Member

This is just an excerpt of settings related to eslint-plugin-svelte and is not intended to be fully functional. This will be improved in the v3 documentation.
#1041

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants