-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
chore: markdown errors #11294
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
chore: markdown errors #11294
Conversation
|
Nice! Thoughts:
|
Say we log this to your terminal:
Compare with this:
Try double-clicking both.
Is there an industry standard for this? Can you give examples?
Yeah, we could do that with blockquote syntax or something. I didn't want to overcomplicate this PR with anything like that though |
Huh, could've sworn I saw many using dash case but looking up others it's a mix of numbers and camelCase, so nevermind. I still don't fully understand the terminal argument though, what advantage do I have from clicking it and getting the full selection? |
Opinion as a bystander: I prefer _ for the same reason Rich suggested, easy to copy with double click and paste in google to figure out the error. And its also more readable IMO |
Shouldn't we instead have a link to the docs (where we can also get into more detail) as part of the error message? That would make that argument irrelevant. |
We could, though in the cases where there isn't more detail that would be a waste of people's time. And it still wouldn't help in cases where you e.g. needed to squelch a warning by copy-pasting the code into a For me the question is less 'why use snake_case?' but 'why use kebab-case?' - it means having a conversion step that ultimately makes it marginally harder to find the markdown source of a particular error, and I'm just not sure I'm seeing any convincing reasons to inflict that on ourselves. |
This begins to scratch an itch I've had for a long time. At present, our error and warning handling is a bit ropey — the messages are stored in a messy module, and are generated by passing magic strings around. This PR moves us towards a state I'd consider more ideal:
.md
files, and as such are much more readable and easy to editNotes:
invalid
vsillegal
, and the order in which words go feels a bit arbitrary. We should audit the whole thing, but I didn't want to get into that here, it can be a follow-uplet:x
or{:then x}
, but the best route is to refactorBinding
, which is also a bit of a mess (I always get confused aboutbinding.kind
vsbinding.declaration_kind
, and it would be good if there was abinding.constant
property)snake_case
rather thankebab-case
. Initially this was because it needs to be that way in order to be valid function names, but I actually think it's better, since you can double-click an error code to select the whole thingThis might seem low priority given all the other stuff that needs to happen for Svelte 5, but it's one of those things with compounding dividends, and since it's technically breaking it's good to do it sooner rather than later.