Skip to content
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

Blocks: Remove require-jsdoc eslint rule #251

Merged
merged 1 commit into from
Oct 11, 2019

Conversation

ryelle
Copy link
Contributor

@ryelle ryelle commented Oct 7, 2019

Remove require-jsdoc from our eslint config. I've been disabling this per-file in #243 & #250, since adding valid jsdoc comments to components (and each method in each component) is more noise than benefit. These are usually overly-generic and the components are just as understandable without them. For example…

/**
 * Component for displaying the block content.
 */
class OrganizerList extends Component {

Sure, ^ this could be "Component to display the organizer list" but that's clear from the code. This doc for render is also not helpful, it's the render function in the edit component, of course it'll render editing UI.

	/**
	 * Render the block's editing UI.
	 *
	 * @return {Element}
	 */
	render() {

Since components can be functions, classes, or anonymous functions, I've just removed the rule entirely – we can trust a developer's best judgement for whether a function needs documentation, and the valid-jsdoc rule will still kick in to check the formatting.

@ryelle ryelle added [Status] Needs Review [Component] Tooling Build tools, automated testing, source control, linting, etc labels Oct 7, 2019
@ryelle ryelle requested review from iandunn and coreymckrill October 7, 2019 20:55
@ryelle ryelle self-assigned this Oct 7, 2019
@ryelle ryelle merged commit d5c24f8 into production Oct 11, 2019
@ryelle ryelle deleted the remove/blocks-eslint-require-jsdoc branch October 11, 2019 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Tooling Build tools, automated testing, source control, linting, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants