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

ESLint v9 config type error #12109

Open
hyunbinseo opened this issue Apr 12, 2024 · 1 comment
Open

ESLint v9 config type error #12109

hyunbinseo opened this issue Apr 12, 2024 · 1 comment

Comments

@hyunbinseo
Copy link
Contributor

hyunbinseo commented Apr 12, 2024

Describe the bug

image
Type '({ readonly rules: Readonly<RulesRecord>; } | { plugins: { readonly svelte: Plugin; }; files?: undefined; languageOptions?: undefined; rules?: undefined; processor?: undefined; } | ... 4 more ... | Config)[]' is not assignable to type 'FlatConfig<RulesRecord>[]'.
  Type '{ readonly rules: Readonly<RulesRecord>; } | { plugins: { readonly svelte: Plugin; }; files?: undefined; languageOptions?: undefined; rules?: undefined; processor?: undefined; } | ... 4 more ... | Config' is not assignable to type 'FlatConfig<RulesRecord>'.
    Type '{ files: string[]; languageOptions: { parser: any; }; rules: { 'no-inner-declarations': string; 'no-self-assign': string; 'svelte/comment-directive': string; 'svelte/system': string; }; processor: string; plugins?: undefined; }' is not assignable to type 'FlatConfig<RulesRecord>'.
      The types of 'rules['svelte/comment-directive']' are incompatible between these types.
        Type 'string' is not assignable to type 'RuleEntry<SvelteCommentDirective> | undefined'.ts(2322)

Reproduction

pnpm create svelte@latest

# create-svelte version 6.1.0
# 
# ┌  Welcome to SvelteKit!
#
# ◇  Where should we create your project?
# │  - create-svelte@6.1.0
#
# ◇  Which Svelte app template?
# │  - Skeleton project
#
# ◇  Add type checking with TypeScript?
# │  - Yes, using TypeScript syntax
#
# ◇  Select additional options (use arrow keys/space bar)
# │  - Add ESLint for code linting, Add Prettier for code formatting
#
# └  Your project is ready!

Logs

No response

System Info

System:
  OS: macOS 14.4.1
  CPU: (10) arm64 Apple M1 Pro
  Memory: 178.81 MB / 16.00 GB
  Shell: 5.9 - /bin/zsh
Binaries:
  Node: 20.12.2 - ~/.volta/tools/image/node/20.12.2/bin/node
  npm: 10.5.0 - ~/.volta/tools/image/node/20.12.2/bin/npm
  pnpm: 8.15.6 - ~/.volta/bin/pnpm
Browsers:
  Chrome: 123.0.6312.122
  Edge: 123.0.2420.81
  Safari: 17.4.1
npmPackages:
  @sveltejs/adapter-auto: ^3.0.0 => 3.2.0 
  @sveltejs/kit: ^2.0.0 => 2.5.5 
  @sveltejs/vite-plugin-svelte: ^3.0.0 => 3.1.0 
  svelte: ^4.2.7 => 4.2.13 
  vite: ^5.0.3 => 5.2.8

Severity

blocking an upgrade

Additional Information

No response

@benmccann
Copy link
Member

This seems like something that would have to be fixed on the eslint side. It's probably best to file an issue there about it

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

No branches or pull requests

4 participants
@benmccann @hyunbinseo @eltigerchino and others