flycheck-eslint errors out with a bare setup #1085
Comments
Oh I wasn't aware that eslint now errors if it doesn't find a configuration. Unfortunately there's little that we can do: We have no infrastructure to re-run a syntax checker with different flags if a particular error occurs, and I don't want to add a special case for just a single syntax checker. Defaulting to The best way though would be to take this issue to eslint and ask them to gracefully deal with the absence of a configuration file. I'd expect eslint to do at least a syntax check of some kind if there's no configuration file. Would you take it upstream? In any case we should probably turn our default back to jshint. @flycheck/javascript Your opinion? |
Can we add a search for an eslintrc to the predicate? |
@aaronjensen I'm not sure. eslint is looking at a lot of places for its configuration—including package.json—and I'm not sure in how far we'd have to deal with its intricate cascading of config files. |
Ok, this is change in one of the recent versions of ESLint. This problem does not occur with 2.8 that I had installed, but after installing 3.5 I got same error. As @lunaryorn said, we can not use predicate, there are different ways to put ESLint configuration. So there is also no way to "auto magically" add Strange thing is that according to ESLint rules page: "No rules are enabled by default.". If there is "default" that are no rules enabled, why We can:
|
@Simplify Yup, I'd love to have eslint people weight in on this issue. |
Ok, I'll open issue there today. Can't do it right now doe some other obligations. |
While it's still the default, eslint support for Ember is really good, and I believe there are plans to make eslint the default for new projects soon. In fact, I actually enountered this because of using eslint within Ember projects. |
@Simplify Hope you don't mind, I went ahead and opened the issue since this is a papercut currently affecting me and my team. |
@cowboyd No problem at all, even I already started creating issue there :) I'll add my 5 cents there. |
@cowboyd The best option for now is to create config in your project and place it in version control. That way everybody on your team will have same config and not have this issue. |
I believe this issue has caused eslint to be extremely slow with |
It seems this broke compatibility with older eslint versions that do not support $ eslint --print-config .
Invalid option '--print-config' - perhaps you meant '--inline-config'?
$ eslint --version
v1.10.3 I realize 1.10.3 is relatively old (Dec 1, 2015) so not sure if there's enough interest to keep compatibility. |
@tko we don't support versions that old. You need at |
Opened up a file with a .js extension using the javascript-eslint checker enabled. It plopped a big nasty error into my minibuffer saying that the checker might be mal-defined instead of verifying the javascript syntax as expected.
It looks as though the problem is that
eslint
throws an error if you don't have at least some configuration file present, even if it's an empty one in your home directory. This seems suboptimal to me, but I don't know if this is something that I should raise upstream, or that can be worked around in flycheck.Elsint does support a
--no-eslintrc
flag that will make the error go away:vs
Perhaps there is a way to detect this and retry with the
--no-eslintrc
set?Environment
The text was updated successfully, but these errors were encountered: