-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Support for Svelte v5 #423
Comments
And we need to hundle |
Does this issue still exist? |
The issue still exists. export type Info = { n: number };
export function foo() {
let a: Info | null = $state(null);
a = null; // *
const d = $derived(a?.n ? fn(a.n) : null);
^^^
return {
get d() {
return d;
},
set(b: Info | null) {
a = b;
},
};
function fn(n: number) {
return n * 2;
}
} (I don't often do DEMO: |
Ah got it! |
Having a rough time figuring out how to set this up with the new flat config. |
I got it working using the following (I do not know your issue, but maybe it helps): ...eslintPluginSvelte.configs['flat/recommended'].map(({ rules, ...rest }) => ({
// Workaround since svelte-eslint's typings are mismatched with ts-eslint's
rules: {
...rules
},
...rest
})), |
@mikededo were you able to get it to parse .svelte files with typescript? That is specifically what I have not been able to get working. |
@pboling Yes. As a heads up, make sure that you update your dependencies as Let me share the full configuration. You'll probably have to adapt things to your liking:
|
Thanks! I was able to get mine working, and I did not need to use |
feat: (experimental) partial support for Svelte v5 parser #421
feat: Support runes #425
$derived
.feat: apply correct type information to
$derived
argument expression #430*.svelte.js
and*.svelte.ts
files parsable.feat: apply runes to
*.svelte.js
and*.svelte.ts
#426$effect.root
(added in 5.0.0-next.14) feat: add support for$inspect
and$effect.root
#446$inspect
(added in 5.0.0-next.16) feat: add support for$inspect
and$effect.root
#446$inspect
API (changed in 5.0.0-next.21) (feat: update$inspect
types #467)(Finally, it changed to$state.raw
$state.frozen
. feat: add $state.frozen rune svelte#9851)$state.frozen
feat: add$state.frozen
support #466$bindable
scope analysis. feat: add support for$bindable()
scope analysis #527See Bindable props are treated as unused variables by eslint in some cases. eslint-plugin-svelte#768
$effect.active()
renamed to$effect.tracking()
{#snippet}
and{@render}
https://svelte-5-preview.vercel.app/docs/snippetsfeat: add support for
{#snippet}
and{@render}
#431Support for new event-handlers https://svelte-5-preview.vercel.app/docs/event-handlersonxxx
seems to be the same as the attribute (prop).So no work is required with this parser. However, I think some work is needed with the eslint-plugin.
(If the expression has type annotations, we should skip the type information that the parser is adding automatically.)
Related to sveltejs/eslint-plugin-svelte#587
The text was updated successfully, but these errors were encountered: