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
Unmatched rule names of scoped plugins. #6362
Comments
@mysticatea I'm not sure what you're suggesting here. Can you explain some more? |
{
"plugins": [
"@mysticatea/test"
],
"rules": {
"@mysticatea/test/test": "error"
}
} I expected this On the other hand, |
My suggestion is:
So this may be a breaking change. |
Oh wow, that's really bad. I agree with your suggestion. This is definitely breaking. We should try to get some feedback from the community to see how many people would be affected. |
I think there are two components here.
You could probably go ahead and implement the non-breaking change and open another issue for the breaking change. |
What happens when there's an unscoped eslint-plugin-test with test rule (proper name "test/test") and a scoped eslint-plugin-test with test rule (proper name "@mysticatea/test/test", but may be found with "test/test") at the same time? |
I use scoped plugins and the need to drop the scope for the rule name was initially confusing. It would help people new to scoped stuff to make the rule names a bit more predictable. Maybe support both for a while in ESLint 3, then 4x could require the scope name? |
@pmcelhaney that's a good point, we can definitely add the correct scoped name resolution without removing the incorrect behavior, though that means naming clashes are still possible. @platinumazure the plugin that was loaded last wins in that scenario. That's why this is a particularly nasty bug. @scottnonnenberg Yes, this is a bug and not intentional. It's very confusing as it is. |
TSC Summary: We've uncovered a bug where scoped npm packages (such as TSC Questions:
|
What version of ESLint are you using?
What parser (default, Babel-ESLint, etc.) are you using?
Please show your full configuration:
@mysticatea/test/test
rule is:What did you do? Please include the actual source code causing the issue.
eslint test.js
What did you expect to happen?
What actually happened? Please include the actual, raw output from ESLint.
I think we should support
@mysticatea/test/test
form's rule specifier.Thought?
The text was updated successfully, but these errors were encountered: