linter-jshint
linter-jshint copied to clipboard
Invalid position given by 'E041'
JSHint returned a point that did not exist in the document being edited.
Rule: E041
Requested point: 42:4
Debug information:
Atom version: 1.18.0
linter-jshint version: v3.1.5
JSHint version: jshint v2.9.5
Hours since last Atom restart: 2.1
Platform: darwin
Current file's scopes: [
"source.js"
]
linter-jshint configuration: {
"executablePath": "",
"lintInlineJavaScript": false,
"disableWhenNoJshintrcFileInPath": false,
"scopes": [
"source.js",
"source.js-semantic"
],
"jshintFileName": ".jshintrc",
"jshintignoreFilename": ".jshintignore"
}
Is your code indented with tabs?
I am seeing this error (along with E020) and my code is indented with tabs.
This isn't the first jshint error I've seen relating to tab indentation. Has the war between spaces and tabs spilled into software tools now? :laughing:
Since @katyasoup never responded, and there's an extremely likely chance they were indenting with tabs to hit this, this is almost certainly another case of https://github.com/jshint/jshint/issues/3151. Please follow that issue for the resolution of this bug.
@AJMaxwell You could say that, as the above issue talks about JSHint currently has a bug with any file indented with tabs where it reports the wrong point in the file.
If anyone is directed to this issue and isn't indenting with tabs, 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.
There are reports that if you set your indent property of your JSHint configuration to 1 this issue can be worked around. If you don't have a .jshintrc file the following should work:
{
"indent": 1
}