Comments (5)
Things like this make me think that we may be better off by having a special attribute like data-enhanced
which signals the preprocessor to preprocess the image? That way we can keep using the img
tag and all the checks that come with it work.
from language-tools.
The workaround I've been using is to just define a class directly on the enhanced:img
and use that. It'd be cool if we could support this, but I don't have enough experience with language-tools to know what's possible
This is because there isn't a preprocess config defined
Is the problem that we use vite-plugin-svelte
to add the preprocessor instead of setting it up in the svelte.config.js
file? We do that to simplify setup - you just install the Vite plugin and that's all you need to do.
I don't know what you guys need exposed exactly. The preprocessor depends on Vite, so I'm not sure if that might cause any difficulty?
from language-tools.
This is because there isn't a preprocess config defined. I am not sure if it makes sense if @sveltejs/enhanced-img should expose the preprocessor or if we should add simplify one in the language server that simply replaces "<enhanced:img"
to
"<img" + ' '.repeat('enhanced:'.length)
from language-tools.
CC: @benmccann I'm not sure what the effects of exposing the preprocessor would mean for the enhanced-img package. What do you think would be best here?
from language-tools.
we may be better off by having a special attribute like data-enhanced
<enhanced:img src="./myimage.png" alt="an avocado" />
vs
<img src="./myimage.png" data-enhanced alt="an avocado" />
The former looks nicer and is fewer characters. There's some possibility we could consider the latter, but it's not my first choice.
This is because there isn't a preprocess config defined.
Could language-tools
support sveltePreprocess
from vite-plugin-svelte
? This isn't just an issue that affects enhanced:img
, but affects everything using that API. And even if we switch to data-enhanced
, it will break again if we add any custom attributes.
from language-tools.
Related Issues (20)
- Support Bazel workspace (or any non-npm workspace)
- no outline in vscode HOT 1
- Cannot ignore svelte lint warnings in the script block HOT 5
- Support tsconfig option in svelte2tsx emitDts
- svelte-check shows errors that shouldn't appear as of TypeScript 5.4 HOT 3
- VSCode suggestions only shows the default value of a generic prop when one is supplied HOT 1
- Derived stores show types as any when using Svelte 5 HOT 1
- CSS class name autocompletion in HTML/Markup HOT 1
- how to disable warning has unused export property HOT 5
- svelte-check hangs on <script> tag with specific attributes HOT 8
- VSCode Plugin does not handle symlinks correctly HOT 4
- Svelte 5: two TS quirks HOT 1
- `svelte-check` inconsistency with eslint HOT 3
- I can't use js snippet by SvelteKit Files HOT 3
- The prompt means "Expected a valid CSS identifier" in SCSS mode. HOT 1
- Svelte 5: No error when passing the wrong type into a bindable property HOT 6
- `.d.ts` files missing silently after emit HOT 2
- Semantic token highlights entire $props() type annotation HOT 10
- Can't find symbols unless *.ts/*.js file is open HOT 2
- svelte-vscode does not support new warning names HOT 2
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 language-tools.