sveltejs / eslint-plugin-svelte

ESLint plugin for Svelte using AST
https://sveltejs.github.io/eslint-plugin-svelte/
MIT License
306 stars 38 forks source link

svelte5 script attribute warning causes svelte/valid-compile error #845

Closed dominikg closed 2 months ago

dominikg commented 2 months ago

Before You File a Bug Report Please Confirm You Have Done The Following...

What version of ESLint are you using?

9.9.1

What version of eslint-plugin-svelte are you using?

2.43.0

What did you do?

What did you expect to happen?

No error for this warning, as it would not happen if the file is properly preprocessed and the extra attribute removed

What actually happened?

pnpm lint /home/dominikg/develop/reproductions/script-attr-repro/src/lib/MultiFile.svelte 2:9 error Unrecognized attribute — should be one of generics, lang or module. If this exists for a preprocessor, ensure that the preprocessor removes it(script_unknown_attribute) svelte/valid-compile

Link to GitHub Repo with Minimal Reproducible Example

https://github.com/dominikg/script-attr-repro

Additional comments

Without executing preprocessors i think the only recourse is to not turn this warning into an error, ignore it for valid compile.

dominikg commented 2 months ago

warning is going to be disabled again in svelte, so things should work as before