-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add new rule require-meta-docs-description
#89
Conversation
c51f68a
to
f289448
Compare
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 |
There was a problem hiding this 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` |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
bf81b18
to
8ee9c27
Compare
beafe71
to
8c74f24
Compare
@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. |
Sorry, that's probably my fault (I force-pushed to master to update a commit message.) |
c9f6164
to
b15a9e8
Compare
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. |
@not-an-aardvark ping? |
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
b15a9e8
to
f91d4b4
Compare
Thanks for the review @not-an-aardvark! Can we get a release? |
Published as v2.2.0, thanks for your patience |
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