Open fev4 opened 1 day ago
After thoroughly testing I seem to have found that the error steamed from an bogus node_modules (deleting and installing again seems to have fixed the issue). I'm closing this as I'm not able to reproduce in the MRE.
Error persists, please read the next comment.
I was thinking about this the wrong way. It's not related to node_modules
, it just a different behavior between pnpm check
and pnpm eslint .
. The first one throws warnings as expected but pnpm eslint .
throws the errors which is the unexpected part. The reason I was confused is that we have a custom formatter and it was using pnpm eslint .
under the hood instead of directly pnpm check
.
Here`s the MRE: https://github.com/fev4/reactive-non-reactive
I'm going to reopen this issue as I believe it's an inconsistency.
Before You File a Bug Report Please Confirm You Have Done The Following...
What version of ESLint are you using?
9.13.0
What version of
eslint-plugin-svelte
are you using?2.46.0
What did you do?
Configuration
``` import js from '@eslint/js'; import ts from 'typescript-eslint'; import svelte from 'eslint-plugin-svelte'; import prettier from 'eslint-config-prettier'; import globals from 'globals'; // /** @type {import('eslint').Linter.FlatConfig[]} */ export default [ js.configs.recommended, ...ts.configs.recommended, ...svelte.configs['flat/recommended'], prettier, ...svelte.configs['flat/prettier'], { languageOptions: { globals: { ...globals.browser, ...globals.node, }, }, rules: { '@typescript-eslint/no-explicit-any': 'warn', '@typescript-eslint/no-unused-vars': [ 'warn', { varsIgnorePattern: '^\\$\\$(Props|Events|Slots|Generic)$' }, ], }, }, { files: ['**/*.svelte'], languageOptions: { parserOptions: { parser: ts.parser, }, }, }, { ignores: [ '.env', '.env.*', '!.env.example', '/static/assets/fa', '.DS_Store', '/package', 'build/', '.svelte-kit/', 'dist/', 'pnpm-lock.yaml', 'package-lock.json', 'yarn.lock.DS_Store', '.pnpm-debug.log', 'node_modules', 'vite.config.ts.timestamp-*', 'playwright-report/**', ], }, ]; ```TransactionType
is an enum and all it's properties have this warning when used inside$:
(we haven't started migration to Svelte 5 runes yet.Then ran:
What did you expect to happen?
I was expecting this to not be an error and instead a warning.
What actually happened?
Link to GitHub Repo with Minimal Reproducible Example
https://github.com/fev4/reactive-non-reactive
Additional comments
When I try to ignore it with the following it persists, which makes sense since these are two different tools (one is the Svelte VSCode extension and the other ESLint):