-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Feature request: New rule to check for properly escaping "<" and ">" characters #864
Comments
Is this not a bug of VSC? Why is there any need for escaping with backslashes? This does not seem part of JSDoc that I'm aware of either... |
This is not vscode bug. Here is typescript playground example: I guess that <...> in documentation comments is interpreted as HTML tag = it is not shown as plain text. If you don't find it useful to add new rule in your plugin - no problem. I can write my own rule for this. |
I see. So we're deliberately not talking about within types here--only the descriptions. Note that, like for XML, one doesn't actually need to escape Note too that one can use any of the XML/HTML5 predefined entities ( And interestingly, one can also use yet another escape mechanism, the Markdown-style backticks (e.g., This is somewhat related to #710 (though yours is as a new rule and doesn't relate to that particular escaping problem). There is kind of a problem as far as the latter not apparently being fully settled on per microsoft/tsdoc#166 . However, I'm starting to think it is a good idea to at least allow configurable support for such escapes, even though I'd really prefer if a standard were coming that we could wait for. But I think we should go with configuration to support which is effectively the de facto standard now, TypeScript (and its tooling). One trick for this latter problem is that the backslash in As to a course of action, I think this proposed rule should have configuration as to whether Not everyone will want this rule, however, as sometimes one intentionally wants to use HTML elements. We could in theory also provide an option to auto-escape backslashes or backticks to avoid unintended escaping, but that would probably not be desired by most (and fixers would need one mechanism). |
🎉 This issue has been resolved in version 39.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) | devDependencies | minor | [`39.4.0` -> `39.5.0`](https://renovatebot.com/diffs/npm/eslint-plugin-jsdoc/39.4.0/39.5.0) | --- ### Release Notes <details> <summary>gajus/eslint-plugin-jsdoc</summary> ### [`v39.5.0`](https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v39.5.0) [Compare Source](gajus/eslint-plugin-jsdoc@v39.4.0...v39.5.0) ##### Features - `text-escaping` rule; fixes [#​864](gajus/eslint-plugin-jsdoc#864) ([1776e18](gajus/eslint-plugin-jsdoc@1776e18)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMC4wIiwidXBkYXRlZEluVmVyIjoiMzQuMTIuMSJ9--> Co-authored-by: cabr2-bot <[email protected]> Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1622 Reviewed-by: Epsilon_02 <[email protected]> Co-authored-by: Calciumdibromid Bot <[email protected]> Co-committed-by: Calciumdibromid Bot <[email protected]>
Motivation
VSCode does not show ""
The escaped version works:
Current behavior
Escaping "<" and ">" is not checked.
Desired behavior
New rule to enforce escaping "<" and ">".
The text was updated successfully, but these errors were encountered: