linter-jshint
linter-jshint copied to clipboard
Invalid position given by 'W069'
JSHint returned a point that did not exist in the document being edited.
Rule: W069
Requested point: 228:51
Debug information:
Atom version: 1.18.0
linter-jshint version: v3.1.5
JSHint version: jshint v2.9.5
Hours since last Atom restart: 4.8
Platform: win32
Current file's scopes: [
"source.js",
"meta.switch-statement.js",
"string.quoted.single.js",
"punctuation.definition.string.begin.js"
]
linter-jshint configuration: {
"executablePath": "C:\\Users\\rafam\\AppData\\Roaming\\npm\\node_modules\\jshint\\bin\\jshint",
"lintInlineJavaScript": true,
"disableWhenNoJshintrcFileInPath": false,
"scopes": [
"source.js",
"source.js-semantic"
],
"jshintFileName": ".jshintrc",
"jshintignoreFilename": ".jshintignore"
}
Does your file use tabs for indentation?
Yes it does? Should I use spaces instead?
Although that is normally a personal preference, currently there is a major bug with JSHint and how it handles tabs. You can follow the details here: https://github.com/jshint/jshint/issues/3151.
If anyone else is directed to this issue and isn't using tabs to indent your files 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.
So if it changing to space indentation fixes the problem then I would do it, at least until the bug is fixed. Thanks for the follow-up and you guys keep the work hard.
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
}