-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add end position to warnings and errors #1250
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1250 +/- ##
======================================
Coverage 91.9% 91.9%
======================================
Files 126 126
Lines 4556 4556
Branches 1486 1485 -1
======================================
Hits 4187 4187
Misses 153 153
Partials 216 216
Continue to review full report at Codecov.
|
Awesome! Language server sounds amazing, will fill a big gap in the ecosystem. Does TypeScript complain if you just pass the whole node through? Am thinking that -validator.error(`:global(...) must be the first element in a compound selector`, { start: selector.start, end: selector.end });
+validator.error(`:global(...) must be the first element in a compound selector`, selector); would be a nice shorthand, and communicates the intent of the code nicely. |
Ooh yeah that does work, will change |
Changed that, I've also added |
Not sure I follow — do you mean in terms of typings? If so I wonder if we should expose the interfaces somehow, rather than making |
The const stylesheet = new Stylesheet(source, parsed, options.filename, options.cascade !== false, options.dev);
validate(parsed, source, stylesheet, options); |
Ah, of course. That's actually slightly unfortunate now that I think about it — makes me think that perhaps Thanks for doing this! Look forward to hearing more about the language server — let me know if there's anything I can do to help. |
Been working on a language server for svelte for better editor support and for that, the end position is needed to nicely display where the errors/warnings are.
I left the start as
loc
to avoid breaking anyoneSneak peek
#1235