Skip to content

Add new rule require-meta-docs-description #89

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

Merged

Conversation

bmish
Copy link
Member

@bmish bmish commented Dec 5, 2019

The eslint core plugin has an internal lint rule to enforce this same thing: https://github.com/eslint/eslint/blob/master/tools/internal-rules/consistent-docs-description.js

@bmish bmish force-pushed the require-meta-docs-description branch 2 times, most recently from c51f68a to f289448 Compare December 5, 2019 18:21
@bmish
Copy link
Member Author

bmish commented Dec 5, 2019

Hey @not-an-aardvark, I've got several PRs open in this repository, for improvements I'd like to make use of in eslint-plugin-ember which I maintain, and which I'd also like to use in the core eslint plugin to replace some of the custom linting they have. CC: @aladdin-add

Copy link
Contributor

@not-an-aardvark not-an-aardvark left a comment

Choose a reason for hiding this comment

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

Thanks for all of the PRs! Sorry about the delay in reviewing.

In particular, each rule description should begin with an allowed prefix:
* `enforce`
* `require`
* `disallow`
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this one should probably be configurable with something like a regex (maybe with enforce/require/disallow as the default). As far as I know, enforce/require/disallow is a convention used by the ESLint team but it's not universally adopted.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, I'll update shortly.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added an allowedPrefixes array option to the rule.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd really rather this be a regex option -- choosing a set of specific prefixes feels like an oddly specific restriction to impose on users of the rule.

Copy link
Member Author

Choose a reason for hiding this comment

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

@not-an-aardvark sounds good, I switched to a pattern option.

@bmish bmish force-pushed the require-meta-docs-description branch 3 times, most recently from bf81b18 to 8ee9c27 Compare December 6, 2019 04:48
@bmish
Copy link
Member Author

bmish commented Dec 6, 2019

@not-an-aardvark it seems like an unrelated commit beafe71 was accidentally added to this PR? That commit was already merged in a separate PR.

@not-an-aardvark
Copy link
Contributor

Sorry, that's probably my fault (I force-pushed to master to update a commit message.)

@bmish bmish force-pushed the require-meta-docs-description branch 2 times, most recently from c9f6164 to b15a9e8 Compare December 6, 2019 20:31
@bmish
Copy link
Member Author

bmish commented Dec 6, 2019

Okay I just rebased to fix it.

Let me know what you think of the PR and then I'd be interested to get a new release once this is merged.

@bmish
Copy link
Member Author

bmish commented Dec 12, 2019

@not-an-aardvark ping?

@bmish bmish force-pushed the require-meta-docs-description branch from b15a9e8 to f91d4b4 Compare December 18, 2019 02:02
@not-an-aardvark not-an-aardvark merged commit b175b46 into eslint-community:master Dec 30, 2019
@bmish
Copy link
Member Author

bmish commented Jan 6, 2020

Thanks for the review @not-an-aardvark! Can we get a release?

@not-an-aardvark
Copy link
Contributor

Published as v2.2.0, thanks for your patience

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.

2 participants