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

Rule: require tests for rules #2

Open
not-an-aardvark opened this issue Apr 6, 2017 · 2 comments
Open

Rule: require tests for rules #2

not-an-aardvark opened this issue Apr 6, 2017 · 2 comments

Comments

@not-an-aardvark
Copy link
Contributor

Requires a rule file to have tests. Can be configured with a location of the tests.

/* eslint eslint-plugin/require-rule-tests: ["error", {"testPath": "../../tests/lib/rules/"}]

If the file at ../../tests/lib/rules/${__filename} exists (relative to rule file), an error is reported.

@aladdin-add
Copy link
Contributor

aladdin-add commented Jul 16, 2017

similar to tests, should also require docs?

@not-an-aardvark
Copy link
Contributor Author

Seems reasonable. The reason I'm not sure about whether this rule is a good idea is because it seems like adding tests for a feature isn't necessarily something specific to ESLint plugins, so it might not be in scope for this plugin.

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

No branches or pull requests

2 participants