-
Notifications
You must be signed in to change notification settings - Fork 141
Error: Cannot find module 'babel-eslint' #1186
Comments
It sounds like this is a duplicate of #845, perhaps? As you say, you want to be able to use global eslint in some projects, and local eslint in others. You didn't say, but implied, that you don't want to change any settings. Because currently you can still turn the |
Yeah, that's what I meant. I think this would be ideal:
This way if we want our own outside-of-projects config, we simply just install eslint and related packages globally, and edit |
Yes, I mostly agree, except that we also need to consider folks who do not want to run any linting at all in projects where there is no My guess is that we will end up with a single option of "Allow fallback to global ESLint", so that your use case can be satisfied, as well as those who do not want to lint their files if the project they're in does not have its own configuration set up. |
How about a simple GUI button? f.e., prettier has the following button to toggle it on/off (look at the bottom of the window): This is what it looks like toggled off: This way we don't have to open Atom settings, go find the package, and then find the setting in the package README. That would be perfect I think!
I bet the main reason this issue has come up before is because of how tedious it is to look for the setting. The button would basically solve that. |
Also Prettier has an option to show or not show the button in the bottom status bar. |
Maybe in linter-eslint's case, the button would have 3 modes to cycle amongst? Ideas for the modes:
When |
As you have written this issue so far, this is just a duplicate of #845. #1068 will break this scenario for what you are asking... but that's because it will match what ESLint itself would do. I would rather follow ESLint here since the "global user config" would only be used if your current project has no configuration. If that isn't behavior that you want then you shouldn't have a global config. Your proposed button should be brought up with the consumers of the service Since it seems like you may not have read #845, the tl;dr of the solution for that is what you have already proposed in #1186 (comment), with the exception that the bundled version is being removed so there would only be the project local install, with a fallback to the global install if available. |
Re-opening #556 (it is not resolved)
@yataras said
then @Arcanemagus said
Until #845 is fixed, this is the best solution. (I want linter-eslint to fallback to global eslint only when one is not found in the current project.)
I have my entire
~/.atom
folder under source control, so if something breaks the brittle workaround that @yataras mentioned, I can easily revert it.I would rather not install
eslint
dependencies into all of my personal projects because it is easier to installeslint
dependencies in one place and for it to work everywhere.The text was updated successfully, but these errors were encountered: