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

ESLint errors on missing JSDocs on React component methods #4504

Closed
ellatrix opened this issue Jan 16, 2018 · 2 comments · Fixed by #4510
Closed

ESLint errors on missing JSDocs on React component methods #4504

ellatrix opened this issue Jan 16, 2018 · 2 comments · Fixed by #4510
Labels
[Type] Build Tooling Issues or PRs related to build tooling

Comments

@ellatrix
Copy link
Member

Issue Overview

Currently ESLint errors if there are no JSDocs on modified React component methods. IMHO, I don't think methods such as render and keyDown all need JSDocs. Additionally there have been tons of missing JSDoc warnings for a while, which is kind of frustrating to go through during development.

Screenshots / Video

screen shot 2018-01-16 at 09 46 03

screen shot 2018-01-16 at 09 46 38

@ellatrix ellatrix added the [Type] Build Tooling Issues or PRs related to build tooling label Jan 16, 2018
@Soean
Copy link
Member

Soean commented Jan 16, 2018

Related to #4245

@pento
Copy link
Member

pento commented Jan 16, 2018

I've been thinking about this a bit, and I'm inclined to agree that JSDocs shouldn't be required for re-implemented component methods.

These docs have little value for parsing out of the project, as the methods are never exported - appropriate inline comments in each method are far more valuable. Much of the content in JSDocs for these methods (render(), in particular), should be in the component docs.

At any rate, the current eslint output is super spammy, and makes searching for actual problems impossible - that needs to go.

@atimmer, @ntwb: If WordPress eslint plugin can be configured to not throw warnings on re-implemented component methods, please do that. Otherwise, #4245 needs to be reverted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Build Tooling Issues or PRs related to build tooling
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants