Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add new require-prop-comment rule #1994

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

Closed
czb3279338858 wants to merge 0 commits into vuejs:master from czb3279338858:master

Conversation

Copy link
Contributor

@czb3279338858 czb3279338858 commented Sep 28, 2022
edited by FloEdelmann
Loading

Fixes #1993

const utils = require('../utils')

// ------------------------------------------------------------------------------
// Helpers
Copy link
Member

@FloEdelmann FloEdelmann Sep 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove unneeded comment blocks.

Comment on lines 29 to 37
/**
* a comment
*/
a: Number,
// b comment
b: Number,
// c
// comment
c: Number
Copy link
Member

@FloEdelmann FloEdelmann Sep 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should single-line comments really be considered "good"? When documenting props is the goal, I think JSDoc comments should be preferred over single-line comments.

Probably also documentation generator tools will ignore single-line comments. What's your opinion about this?

Copy link
Contributor Author

@czb3279338858 czb3279338858 Oct 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think JSDoc comments should be preferred over single-line comments too.
The second parameter will provide a choice,line 、block or unlimited
I am thinking about the following questions
1.Can I mix them?
2.Need to limit the quantity?

Copy link
Member

@FloEdelmann FloEdelmann Oct 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the rule should only consider JSDoc comments (/** */) and ignore block comments (/* */) and line comments //. No need to limit the number then, since only the JSDoc comment immediately before the statement will be considered.

@FloEdelmann FloEdelmann changed the title (削除) require-prop-comment (削除ここまで) (追記) Add new require-prop-comment rule (追記ここまで) Sep 30, 2022
@ota-meshi ota-meshi marked this pull request as draft October 4, 2022 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@FloEdelmann FloEdelmann FloEdelmann requested changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

require-prop-comment

AltStyle によって変換されたページ (->オリジナル) /