Skip to content

Chore: add require-meta-docs-url internal rule #341

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
merged 6 commits into from
Jan 18, 2018

Conversation

mysticatea
Copy link
Member

This PR adds require-meta-docs-url internal rule to verify meta.docs.url property on all rule files (related to #340). Details:

  1. I found eslint-plugin-eslint-plugin rules use module.exports.create to distinguish whether a file is an ESLint rule or not. If the create property is not a method (e.g. a variable reference), eslint-plugin-eslint-plugin rules ignore the file. As the result, most rules in this plugin are ignored.
    6589d4a fixes the problem. It moves every craete function into the RHS of module.exports.
  2. 61e3a4f adds require-meta-docs-url internal rule.
  3. 404d433 applies the internal rule to our rules. And I improved those URL to version specific documents.
  4. e7c3ec4 modifies npm version <type> script to update those URL by new version.

I have a plan to send require-meta-docs-url rule to eslint-plugin-eslint-plugin. After I have done it, I will send another PR to upgrade eslint-plugin-eslint-plugin plugin.

I found that `eslint-plugin-eslint-plugin` rules are using `create` function to detect ESLint rule files. If `create` is not a method (includes a variable reference), `eslint-plugin-eslint-plugin` rules don't work properly.
Copy link
Member

@michalsnik michalsnik left a comment

Choose a reason for hiding this comment

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

Hey, thank you for working on this :) Though I'd prefer to wait for the release of eslint-plugin-eslint-plugin I see it would be hard to work on other things without introducing more and more conflicts here.

@michalsnik
Copy link
Member

Please resolve conflict and feel free to merge it @mysticatea :)

@mysticatea mysticatea merged commit 095ef4f into master Jan 18, 2018
@mysticatea mysticatea deleted the internal-rules/require-meta-docs-url branch January 18, 2018 03:57
@mysticatea
Copy link
Member Author

Thank you!

eslint-plugin/require-meta-docs-url was merged but not released yet. (eslint-community/eslint-plugin-eslint-plugin#56)

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

Successfully merging this pull request may close these issues.

2 participants