-
Notifications
You must be signed in to change notification settings - Fork 39
Invalid position given by 'W033' #422
Comments
Is your file indented using tabs? |
Yup.
This came out of nowhere yesterday when I updated.
|
Please follow jshint/jshint#3151 then, this is a known issue with JSHint being broken with almost all files indented using tabs. |
Reopening this as a tracking issue so future users that update to v3.1.5 will get directed here and see the related JSHint issue. If anyone is directed here and isn't using tabs to indent your file please file a new issue with a file to reproduce it on the JSHint repo, or file one here and I'll try to help you in getting one filed there where it can be fixed. |
I'm also suffering from the same error. error is reported in the FIRST line of a javascript file. None of the presented solutions worked. This is so disappointing. |
@ETGgames I've removed your comment as it contributed nothing to the discussion and was simply a cuss filled rant. In case you don't understand, this problem has nothing to do with the package here, the issue is a bug on JSHint's part. |
@seme1 The problem is that JSHint has a major bug with any file that is indented with tabs. You can work around this by indenting your files with spaces or switching to a different linter. I would highly recommend ESLint as it is by far the best linter of the dozens that I have worked with.
The entire problem is that JSHint is reporting points that don't exist in the file. Since the points don't exist in the file a range is generated for the entire first line of the file so you can still see that there is a problem. If you want to help fix the problem please see the linked JSHint issue and help them solve it there so this can get fixed for everyone. |
Ok, well i'm calmer now because i have switched over to sublime and jshint works well there. Also sublime is a much less buggy ide and is more pleasant to use despite having fewer features. ESlint doesn't work as I want either, in fact, there are no atom packages that lint JS properly. I wasted a full 8 hours yesterday trying. |
@ETGgames I really don't think you understand this issue at all. JSHint doesn't work anywhere. If you are indenting with tabs, it is giving you incorrect results, no matter where you are using it. The fact that it's "working" in Sublime just means the author of the integration there isn't telling you that JSHint is giving them invalid results. If that solution works for you though, I'm glad you have something that works for you! |
I got this error while editing a file I downloaded from a project. I unindented the entire file, saved, and quit Atom. Started Atom again, indented the file to my liking and saved. This fixed the issue. |
@NetOperatorWibby There is no fix for this other than using spaces for indentation. |
@Arcanemagus I forgot to mention I prefer spaces to tabs so that explains why my issue was fixed. Welp. |
- To circumvent this JSHINT issue AtomLinter/linter-jshint#422 Apparently, it doesn't like tab indentation. Boo!
I don't know if this is still bugging anyone else but after 3 years I finally couldn't stand it anymore. There's been a PR open here for 2 years that fixes jshint/jshint#3151 but hasn't been merged into I cloned that fork to my local machine, pulled in the changes from upstream, merged the conflicts (they were all fine), and rebuilt the binary:
Then in And that fixed the issue. |
JSHint returned a point that did not exist in the document being edited.
Rule:
W033
Requested start point: 2025:15
Debug information:
The text was updated successfully, but these errors were encountered: