Comments (5)
What is the desired behavior here?
Is it about this being flagged as an error instead of a warning? If eslint-svelte
flags this as an error, that sounds like something within your eslint config which treats warnings as errors (possibly to be more strict).
Or is this about not warning about this in the first place? If yes I'd like to see a non-minimal reproduction because the way it's written is certainly not how it appears in your code, to better understand if there's a false positive we could silence.
from svelte.
First of all, I'm not sure why this would be flagged as an error/warning, since it's just passed to the component as a property and there are no reactive updates that depend on it.
You can see that if you move the variable to a non-module script, the error disappears: Svelte5-REPL
Secondly, I don't know why it's flagged as a different level of error in eslint-plugin-svelte
and svelte
, I don't have any custom rules.
because the way it's written is certainly not how it appears in your code
I'm not sure what you mean, but I think minimal reproduction is enough to illustrate the problem, I'm not sure what you're looking for.
If you don't think the issues exist there, feel free to close the issue.
from svelte.
I can't help you with the eslint case (it may be that the default is to error on these warnings). As for the warning itself, this is a non-runes file in which this error shouldn't appear.
I'm not sure what you mean, but I think minimal reproduction is enough to illustrate the problem
What I mean is: Your reproduction is too minimal. Surely you didn't write code like this in your real app, so I'd like to see a more realistic, less minimal example to understand whether this is a false positive or not.
from svelte.
Surely you didn't write code like this in your real app, so I'd like to see a more realistic, less minimal example
Sorry, I still don't understand what you're saying, this is a minimal reproduction of the code from my REAL app. I don't have time to make up code that doesn't exist to flood(?!) the repo.
In fact it is a very complex object, so adding any non-relevant code will cause a huge increase in complexity. I don't want to throw the whole app at you, and I can't.
I also don't want to make an extra complicated reproduction for this. I've spent a lot of time investigating and making this minimal reproduction. It's effective and straightforward.
I'm guessing you're looking to see if it's being used as a reactive variable elsewhere, but you shouldn't, in this reproduction it's not, so it shouldn't be a warning, right?
Also yes, it's not a rune file, it's code come from Svelte 4.
I can't help you with the eslint case
Maybe it should be forwarded to the eslint-plugin-svelte
project? So this isn't your part? You don't have a transfer mechanism?
If you can't reproduce it locally, I could try replicating the project environment, but are you saying you're not interested in investigating that at all?
from svelte.
Ok it's a non runes files so #11434 will fix this
from svelte.
Related Issues (20)
- "node is null" when manipulating an array state in a Snippet HOT 4
- Styles are not removed after transition slide end HOT 1
- Svelte 5 migration: statements should be reordered
- Svelte 5: leaking private implementation details ($$events, $$slots) HOT 3
- Svelte 5: Snippets aren't deconflicted HOT 5
- Svelte5: snippets components invoked multiple times HOT 4
- The exported names of the reactive Map, Set, and others conflict with platform globals HOT 6
- Svelte 5: non-keyed each blocks do not retain text direction in elements with `dir="auto"` HOT 2
- Svelte 5: <select>s don't properly set their initial value if the option value is an object HOT 4
- Svelte 5: Changing of the items in #each block breaks order of the element HOT 1
- Using a generic type as an argument to a Snippet breaks types generation of a component HOT 4
- Svelte 5: Optimize reads to getters HOT 2
- Svelte 5: Unexpected character '@' when using *.svelte.ts with Decorators and $state and importing in client HOT 5
- Improve message for error "Nesting selectors can only be used inside a rule" HOT 5
- Svelte 5: Regression since 5.0.0-next.162 with #each or render HOT 2
- Svelte v4 components under Svelte v5: Internals leaked through slot variables when defined in component HOT 7
- Svelte 5 - Relax Variable Naming Restrictions on $-Prefixed Variables HOT 7
- Svelte 5: Components in #if blocks don't trigger their $effect rune HOT 9
- False positive error: rune outside svelte HOT 1
- Bump all dependencies before final release
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svelte.