-
-
Notifications
You must be signed in to change notification settings - Fork 179
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
[Linter] Error running ESLint Error: require(...).getLocationFromRangeIndex is not a function(…) #11
Comments
Does this still occur with |
Not sure if this is important/relevant but this error only happens when the file does not conform to the prettier format. If a file is already formatted by prettier than the linter doesn't log this error |
Hmm, that's odd. You're right that the function from What version of eslint do you currently have installed? (Your package.json just shows |
Yes the version of eslint I am using is Edit: After restarting atom it works on version |
From your stack trace screenshot, I see that you're using eslint from atom. Have you tried restarting atom? I wonder if it's caching the version of eslint somehow. (Apart from that, I'm not sure what the problem would be given that it seems to be working on master and for other people.) |
Sorry I made an edit to my previous comment, you most not have noticed it. After a restart of atom it is working now with version |
Great, glad to hear it's working now. |
ESLint is failing to run for me with
eslint-plugin-prettier
rules activated (i.e. with"rules": { "prettier/prettier": "error" }
set).This is the stacktrace from atom:
As it says in the stacktrace, the error comes from this file on line 30 where it calls
require('eslint/lib/ast-utils').getLocationFromRangeIndex(...)
.Upon inspection of eslint/lib/ast-utils I see that the function no longer exists. The function was removed in this commit.
The text was updated successfully, but these errors were encountered: