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-plugin-wpcalypso: potential improvement for import-docblock #44387

Closed
jeherve opened this issue Jul 23, 2020 · 0 comments · Fixed by #44388
Closed

eslint-plugin-wpcalypso: potential improvement for import-docblock #44387

jeherve opened this issue Jul 23, 2020 · 0 comments · Fixed by #44388

Comments

@jeherve
Copy link
Member

jeherve commented Jul 23, 2020

Steps to reproduce

  1. Starting on a codebase using wpcalypso/react
  2. In a new file, add the following:
/**
 * WordPress dependencies
 */
import { __ } from '@wordpress/i18n';

export default {
...
  1. This triggers wpcalypso/import-docblock, even though there are no other imports in the file, so we cannot have external or internal import docblocks (or they'd be empty).

I think it would make sense to update the rule to have it look for "WordPress dependencies" as well, since those can now be valid imports, on their own within a file.

Related discussion:
Automattic/jetpack#16545 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant