-
Notifications
You must be signed in to change notification settings - Fork 4
fix(documentation): do not remove JSDoc types in Vue JS files #995
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
Conversation
d71ce12 to
062ad14
Compare
|
I'll add tests if the idea is fine |
susnux
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea! Did not check yet!
susnux
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems to work 🚀
|
what is missing here @ShGKme ? |
Signed-off-by: Grigorii K. Shartsev <[email protected]>
My willing to add tests here with all the cases. Oh, and a general dislike of the solution, as it is a half-solution. For example, it just disables |
062ad14 to
3ad54d6
Compare
3ad54d6 to
c461e0a
Compare
Signed-off-by: Grigorii K. Shartsev <[email protected]>
c461e0a to
e1587f3
Compare
|
.vuewhen there it has nolang="ts"#980npm run lintbreaks many Vue + JS files if TS config is usedHalf-working solution
jsdoc/require-property-typemakes no harm in TS, there are no@property.vuefiles (that can be both TS and JS):jsdoc/no-typesonly if there are TS typesjsdoc/require-param-typeonly if there are no TS typesjsdoc/require-returns-type(because a return type is often inferred, not specified)jsdoc/check-tag-names(because it can be used in a JS component)So it doesn't break existing JS components (like before).
But it applies only ~half of JSDoc + TS rules in TS components.
Alternative
Generate
fileson the fly by checking<script lang>to distinguish between JS and TS Vue files.