-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
⚠️ Read this about TS parsing errors before submitting an issue ⚠️ #1111
Comments
If it helps anyone: {
files: ["**/*.svelte", "**/*.svelte.ts"],
languageOptions: {
parserOptions: {
projectService: true,
extraFileExtensions: [".svelte", ".svelte.ts"],
parser: ts.parser,
svelteFeatures: {
experimentalGenerics: true,
},
svelteConfig,
},
},
}, |
I'm still getting this with config from README (without It happens when I have onchange={async event => {
const input = event.target as HTMLInputElement
const file = input.files?.[0]
if (file) {
const img = document.querySelectorAll(`form img`)[
index
] as HTMLImageElement
img.src = URL.createObjectURL(file)
}
}} |
Scratch that, it happens with TS inside handlers. ...and it looks like also when you have onsubmit={async ()=> {}} |
@Lippiece I can not reproduce this. Can you create a new issue with reproduction? |
Thanks for checking this out. I couldn't do it. The same config works if eslint is installed locally, but not globally. Maybe someone else will have an idea. ...looks like the problem was in |
There have been reports of the error "Parsing error: Unexpected token {", which occurs due to missing configurations in
eslint.config.js
.Please refer to the documentation and ensure your settings are correct. If the error persists despite correct configuration, feel free to open an issue.
https://github.com/sveltejs/eslint-plugin-svelte?tab=readme-ov-file#typescript-project
The text was updated successfully, but these errors were encountered: