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
eslint-config-standard@5.3.1 wants eslint@^2.0.0-rc.0 #6617
Comments
This is an npm warning due to incompatible peer dependency relationship between eslint-config-standard and eslint. In this case, eslint-config-standard wants ESLint to be between 2.0.0-rc0 (inclusive) and 3.0.0 (exclusive). This is an eslint-config-standard issue- they need to release a version that has a peer dependency that includes eslint@3.0.1. They may not be ready to do that. If you want to avoid any risk of incompatibility, you may want to use eslint@2.x. Closing as there's nothing for ESLint to do (but feel free to ask for clarification or to reopen if you believe ESLint has an issue). |
Sorry, I wasn't clear on the divisions between the different projects. I wasn't expecting I will open a ticket with eslint-config-standard. Thanks |
@rgant In that case, the issue seems to be that ESLint wants to install packages at their "latest" version, but that doesn't take into account peer dependencies. I believe we rely on the |
It would be best if there was an automatic solution to detecting compatibility issues, however I believe that the list of "popular style guides" is curated by the developers of this project: eslint/lib/config/config-initializer.js Line 318 in 3e690fb
So all I am suggesting is that if a particular config package cannot be installed in the current version of eslint, then it shouldn't be included in that list. Alternatively, I think I would be happy as a new user if instead of prompting "Which style guide do you want to follow?" the initializer just informed me how to find these packages on my own. Maybe if it said something like:
|
We've definitely had users complain about packages not being installed/available, so that's why we made the change to install packages during And yes, we curate the list of available packages, but that doesn't mean we check them to make sure they are peer-compatible with us (especially when we do a major version release). That would not be feasible without an |
I am just starting out using eslint, but I do appreciate the work you've done. It's already helped me resolve several issues with my application. I honestly don't want to badger you over this. I got what I needed configured and am happily using eslint on my app. I'll stop after this. There is a
You could add something like this:
to Line 52 in 3e690fb
And then add these tests for the list of popular styles to eslint/tests/lib/config/config-initializer.js Line 182 in 0c0159b
|
That might not be a bad idea to add |
Maybe I'm missing something, but how does doing a dry run help? It seems to output the same error message. |
I think the hook is we don't output dry-run and instead parse it for
|
@platinumazure Is correct. Instead of outputting raw npm error message, we can at least say something about `Failed to install style-guide due to version mismatch. Please see our repository for more details", or something like that. |
I think it would be preferable not to list incompatible packages in the first place, even if we have to hand-edit them |
@alberto Every single time we do major version release all of those packages become incompatible for next few weeks. |
Well, there's the whole release candidate thing so that packages have more time to adapt... but I know we had a good reason not to do it this time around (that being pain for the project lead). |
I know, that's why I said we would have to hand edit the list. I think it's a bad experience to show a list to a user and then tell him the style selected is not really available. |
@alberto We could execute |
@ilyavolodin @alberto One other possibility might be to see if |
@platinumazure I think that's overkill for this. Let's remember, people only run this one time at the beginning of their project, so we should solve it in as lightweight a way as possible. |
@ilyavolodin Would you run each one separately? That will probably take a few seconds. At what step would you do it? On init? When they say the want to use a style guide? What if there is none available? I know disabling and enabling by hand with each major release isn't ideal either, but... |
I just updated |
AirBnB hasn't published their update yet (although they already made the changes). I also don't think eslint-config-google will work either, since XO hasn't been updated, and google relies on XO. So only Standard will work at this point. |
Are issues open on each of those repos already? |
What's the action item here? |
Even if it gets updated, this will happen again when we release v4, so we should try to come up with a plan for that. |
I think we should encourage shareable configs to specify only a minimum compatible version and not a maximum (like |
Looks like the Google config only has a minimum version: https://github.com/google/eslint-config-google/blob/master/package.json#L47 Can anyone confirm if this is still a problem with that config? |
I like that 👍 |
@nzakas Sorry, you are right, I didn't notice the Google range syntax. I verified it works with 3.4.0. |
Just tried to install eslint for the first time following the readme and I got the following errors with
eslint --init
choosing the standard config.What version of ESLint are you using?
3.0.1
What parser (default, Babel-ESLint, etc.) are you using?
default I assume?
Please show your full configuration:
What did you do? Please include the actual source code causing the issue.
There actually wasn't a 'npm-debug.log' file in directory in spite of what the error message indicated.
What did you expect to happen?
Successful --init
What actually happened? Please include the actual, raw output from ESLint.
The text was updated successfully, but these errors were encountered: