-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
Possible Regression or Major Change? #156
Comments
Just a guess: 5bd3684 |
I'll look into it today. |
Closing with the following message. Ping me if this doesn't resolve the issue. |
It seems 8.7.0 wasn't the problem. However there was a problem there. |
@zimme I just ran into this and debugged a bit. I think it's actually bed4374#diff-2b4ca49d4bb0a774c4d4c1672d7aa781, which adds the concept of dynamically determining unfixable rules. While good in concept, this line presents some problems:
because, AFAICT, Linter's constructor doesn't take any arguments (https://github.com/eslint/eslint/blob/88d5d4dbd09dd7f23e9fff79087bc13adaac051b/lib/linter.js#L710), which means the existing config gets lost, and only the default rules get loaded (https://github.com/eslint/eslint/blob/88d5d4dbd09dd7f23e9fff79087bc13adaac051b/lib/rules.js#L63), thereby dropping all rules from plugins being considered as "fixable" rules. Since they aren't considered fixable, they get omitted here: https://github.com/prettier/prettier-eslint/blob/master/src/utils.js#L91 |
@ncknuna, Thank you for looking into this. It seems that you are correct in the fact that However, even if I do remove the parameter to I use this map of rules to find out if the rules I iterate over here is fixable. |
Is there a chance that there are fixable rules that don't have |
@zimme, you're right that if you remove that parameter to Linter that the code will work the same, but at least from my inspection of the logic behind the The easiest way I can thinking of getting all of the rules that are provided by all plugins is to update |
I'm encountering this issue as well. In my debugging, I noticed that one of my rules that's defined by a plugin does not appear in the array produced by @ncknuna's explanation on why this happens seems correct to me. |
Nice catch @ncknuna and @noisysocks, I hope to have a fix out today. eslint 4.15.0 was released just a few days ago and that version should have |
@zimme I think the options that the Linter expect are different than the options that the CLIEngine expect, so one isn't just a drop-in replacement for the other. After updating to the newest version and running with trace-level logging, I got the following error:
|
Aah yeah, it's that problem again. The |
@ncknuna, check if the latest version fixes your issue. |
@zimme Getting there! That latest version does fix my issue, but still doesn't include the rules from plugins. It seems that this |
I think I'll just memoize |
Go for it; I don't have a strong preference on implementation details, I just want my plugin rules! :) |
@zimme Any updates? Hoping to get this all sorted out by end of week :)... If it's going to be a little while before it can get fixed, we should probably re-open the issue so other people can find it |
I'll look at this later tonight, still at work. If I can't find a good way
to do this tonight I'll just remove the fixable rules filtering until I
can find a proper solution.
|
Awesome, thanks! |
I'll be removing the filter fixable rules logic until I can do some refactoring. |
@ncknuna Test the latest version. I'm getting some warnings now, but that seems to be related to I'll open an issue over there. |
Yay, fixed for me! Thanks so much! :D |
I'm thinking that some of the reported issues here are because of some error in the following logic. https://github.com/prettier/prettier-eslint/blob/master/src/index.js#L99-L117. |
Version |
@zimme I'm facing the same issue on package.json
command used
error |
It seems this issue is not fixed. |
Hey there, I'm getting a bunch of conflicting reports on the prettier-atom repo about people's prettier-eslint all the sudden not respecting their config: prettier/prettier-atom#334 (comment)
Was there a breaking change or possibly a regression somewhere in the 8.5.0 release? These reports started coming in when I bumped the bundled version that comes with prettier-atom.
The text was updated successfully, but these errors were encountered: