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

Add test for rule jsdoc type comment #1612

Merged
merged 3 commits into from Nov 17, 2021

Conversation

bmish
Copy link
Sponsor Collaborator

@bmish bmish commented Nov 16, 2021

Follow-up to #1606

Ensures each rule has this jsdoc type comment. Otherwise, it would be easily forgotten in new rules.

@bmish bmish force-pushed the jsdoc-type-comment-rule-test branch from bdd6dde to 2179743 Compare November 16, 2021 17:48
@fisker
Copy link
Collaborator

fisker commented Nov 16, 2021

I'm 👎 for this, this type info supposed to help rule author write the module.export, users can not import these files directly.

@fisker
Copy link
Collaborator

fisker commented Nov 16, 2021

Maybe add this jsdoc to this function is useful.

https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/rules/utils/rule.js#L77

@bmish
Copy link
Sponsor Collaborator Author

bmish commented Nov 17, 2021

I'm 👎 for this, this type info supposed to help rule author write the module.export, users can not import these files directly.

The jsdoc comment is only intended for the convenience of internal developers. What's the problem with testing to ensure each of our rules has it?

@bmish
Copy link
Sponsor Collaborator Author

bmish commented Nov 17, 2021

Maybe add this jsdoc to this function is useful.

main/rules/utils/rule.js#L77

Good idea, added (can be moved to separate PR if desired).

@bmish
Copy link
Sponsor Collaborator Author

bmish commented Nov 17, 2021

Maybe add this jsdoc to this function is useful.
main/rules/utils/rule.js#L77

Good idea, added (can be moved to separate PR if desired).

Extracted to separate PR: #1613

@sindresorhus sindresorhus merged commit ba64055 into sindresorhus:main Nov 17, 2021
@sindresorhus
Copy link
Owner

I agree we should enforce consistency here.

@bmish
Copy link
Sponsor Collaborator Author

bmish commented Nov 17, 2021

Thanks. By the way, can we enable the GitHub setting "Automatically delete head branches", so we don't have to manually click "Delete branch" each time?

@sindresorhus
Copy link
Owner

Weird. It's already enabled.

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

Successfully merging this pull request may close these issues.

None yet

3 participants